Updating Automated Workflow Records Via API
Hello all, silly question, but I thought I'd ask anyway -
Can you update a record in the automated workflow with either the REST or SOAP API? Meaning, can you take a record from one stage of the workflow to a separate stage of the workflow?
I think it would depend on the node type the record is on. For example, a User Action node requires a user to click a button and this is not possible via API. But a Wait For Content Update node might since there is a delay before the rule is processed again.....of course, give this a test.
User Nodes I'm less concerned with, yep. The Wait for Content Update nodes are the ones that I'm more wondering about.
How would I reference the Node to direct the record? Meaning, if I'm on Wait for Content Update node A and I'm sent to Wait for Content Update node B, how do I get the record back to Node A?
Again, knowing that there's no official solution for this. How about the "unofficial, if I were guilty, I'd do it this way" version?
I would guess that wait for content update would mean that whatever your rules are for the "wait node", you need to use the APIs to update those fields.
Not sure if this works, tho...
If I'm right, this would be the normal webservice or rest api to update a record content.
Jason is correct.
You should just be able to update the particular field(s) you want via the API. The record can only sit on one node at a time. So if node B is a Wait node and you update the field being evaluated then save the record, AWF should send the record back to the eval node, which then evaluates the completed field and then flows to where ever AWF says is the next node.
I mocked up a simple example and confirmed that REST API can update a record sitting on a Wait node and the Evaluate Content node processes it correctly.
I tested with sending record back to the Wait node (or User Action node) by default and if the Rule is true. When the Name field equals "1", the Rule is true and moves to the Update Content node to completion.
Sample REST API Body with PUT verb to update the record:
"Tag": "Test app",
"Tag": "Name field",