Jump to content

Updating a request using the API & suspend node


Recommended Posts

Evening all, almost Friday!

:) New Hornbill Service Manager customer here.

I'm currently trying to get my BPM workflow to move past a "Wait on Request Update" suspend node by updating it using PowerShell and the API but I'm hitting an issue and was hoping someone could steer me in the right direction.

Up to now I've been able to update the requests using Requests::update to make a number of changes but this doesn't appear to progress the flow past the suspend node. I've also attempted updating the description field via the API while using the "Wait for Request Description" task in the flow but this too didn't go anywhere.

This is the code I'm using to do the update to the description field in this case.

# Build XMLMC API call
Add-Param "requestId" "SR00000646"
Add-Param "h_description" "Updated AGAIN!"
   
$xmlmcOutput = Invoke-XMLMC "apps/com.hornbill.servicemanager/Requests" "update" -Verbose

 

Is there a different method I should be using to fulfil the update action that the suspend node is waiting on? 
 

Many thanks

Brendan
 

 

Link to comment
Share on other sites

@Brendan

I am not terribly familiar with the underlying workings of Service Manager, but from a BPM point of view, the suspend node is a logical expression, almost certainly checking the state of something in the database.   However, the BPM does not poll for changes, its event driven, so assuming you have changed the state accordingly, the BPM will need to be woken up.  Typically this is done by some application-defined Flowcode (our internal back-end scripting environment that application teams use to build application logic and function) operation. You could call bpm::resume but there may be other logical stuff that needs doing to maintain the applications data integrity.  

By the looks of it, you are just updating the request description, but that is probably not what the BPM node is waiting on.  Review the following API's under Requests, possibly there is a requestUpdate related API that will also deal with the underlying mechanics of waking the BPM in the right context for you. 

https://api.hornbill.com/apps/com.hornbill.servicemanager/

possibly this one (I am only guessing)

https://api.hornbill.com/apps/com.hornbill.servicemanager/Requests?op=updateRequest

I am sure one of the SM team devs or specialists will be able to be more precise here, but thats the general area you want to be looking at

Gerry

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
 Share

×
×
  • Create New...