Update custom activity in a workflow

aaronliprime
Tera Contributor

Hi,

I have a lot of custom PowerShell activities in my workflow. The problem is the activities in my workflow don't update to the new version when I

update the custom activities themselves. Is there a way to replace an old version with the new one without deleting the old one and adding the new one?

Thanks

7 REPLIES 7

My developer instance is Istanbul. It appears that if the workflow is checked out at the same time that you have the custom activity checked out, it is automatically updated in the workflow.


My Helsinki instance doesn't appear to work this way.


arturoma
ServiceNow Employee
ServiceNow Employee

Hi Aaron,



If you are the owner of both, the workflow and the activity to be modified, the best way to keep them in synch is as follows:



Checkout the activity & checkout the workflow that uses that activity at the same time.


Now, any changes done on the activity should be immediately reflected on the checked out workflow.



Also, any other published workflows that were using that activity will either get updated or annotated under the


following conditions:



If the activity on the published workflow is pinned, then the activity will be annotated as out-of-date (color coded : orange)


For this, user will need to checkout the workflow and can manually update the activity to use the newest published version by right-clicking on


the activity and select "Update activity" menu action.



Please refer to the WIKI pages for manual update:



https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/administer/using_workflows/task/t...



If the activity on the published workflow is unpinned, then the activity will be updated to use the newest published version (color coded : green)



However, there is a caveat to the above, since Istanbul release.


If the activity was modified drastically as to be a "contract" change, then regardless of the pin state, they only get annotated.



A "contract" change is considered change to the activity inputs, outputs, and conditions that has a potential to make the workflow


"hang" because is either missing inputs, outputs, and there are new conditions to transition, but the workflow currently does not have


a transition from it.



Please mark Helpful, Like, or Correct Answer if applicable.


Vespertinus
Tera Expert

We face the exact same situation. We have a published Workflow with REST Activity that now has to be updated.

We updated the REST Activity and see that the pinned Activity in published Workflow is now turned "green". Does it mean its fine now and updated correctly? Without need to checkout and publish Workflow again?

Currently there are no Workflow instances running. System version: Kingston.

Thx and best regards

Vesp