Jump to content

API Call - Auto Task Run


Jim

Recommended Posts

Hi have created an API call to run an auto task, it appears to work and return an autoTaskID, but I can't seem to see it actually running the autotask against the requests, is there any examples available to see how it should be structured?

        params     = @{
            application     = "com.hornbill.servicemanager"
            name            = "scc-portal---hold"
            reference       = "IN00071802"
           
        }

Params currently look like the above, should reference be the bpm? I have tried this and do get a status true and an autoTaskId but again no actual evidence of it actually running

Link to comment
Share on other sites

You're passing a Request ID, not a URN as specified in the documentation.

I believe the urn should be something like

urn:sys:entity:com.hornbill.servicemanager:Requests:IN00000000

Note: not an API I've played with, so keep an eye out for any corrections.

Link to comment
Share on other sites

@Jim

The Autotask API takes an array of inputParams, so the full JSON for your autotask would be:

{
  "@service": "bpm",
  "@method": "autoTaskRun",
  "params": {
    "application": "com.hornbill.servicemanager",
    "name": "scc-portal---hold",
    "inputParam": [
      {
        "name": "requestId",
        "value": "IN00071802"
      }
    ]
  }
}

 

  • Thanks 1
Link to comment
Share on other sites

Quote

The Autotask API takes an array of inputParams, so the full JSON for your autotask would be:

This was going to be my next effort and ran out of time, but this works perfectly without having to fetch the URN's thank you 

Link to comment
Share on other sites

Wow, This has proved invaluable as I had hundreds of leaver requests sat on processes that were really old, so being able to create an auto task that flips the process onto the new process and then triggering it using this has helped to get them all up to date on the latest processes :D 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...