Identify the Process instance ID of a cancelled process for re-triggering the instance

Hello !

I have a requirement to re-trigger a specific process model instance, that is cancelled automatically as part of a existing process. The specifics in this is that I would need to achieve this via a process model automatically. I can use the Resume or Start Process smart service for achieving this but the smart service expects the process ID.

I have the process name, process model ID, process model UUID and the employee ID that is used as part of the process as a process variable. Using these, is there a way to identify the process instance ID?

Thanks !

  Discussion posts and replies are publicly visible

Parents
  • We have found it handy to retain the process id (pp!id) for some process models that are likely to run for a while in the database. When the process is created and we store the key data fields for the process/application in a CDT/database table we add a processid column to the CDT. By storing it in the database we can access it when needed for debugging or possibly sending messages to the process.

    A few thoughts:
    1) pp!id values can be reused sometimes, so you may want to consider setting the value to null in your cdt/database when you complete the process model and don't anticipate needing it anymore (so you don't retain legacy ids that may cause duplicates in the future)
    2) the pp!id I believe is stored as an integer but sometimes needs to be stored as a text field I think, or maybe it is the other way around. just be aware of the data type that Appian sees it as in the reports, etc. You don't want leading 0's to be lost, etc.
    3) we haven't restarted processes using this method I don't believe, but you probably would want to verify the process exists before calling the restart node smartservice, etc. I've found that some Appian functions are a bit finicky with null values and invalid values (for instance, if you have a user with a supervisor and the supervisor's account is disabled, the update user profile smartservice hiccups because of the essentially invalid supervisor.
  • Fortunately we have this process id stored in the database thereby it made my task easier in a way to achieve the solution. Here is what I did - I relayed on the process id that was extracted using a query on db to the 'Start All Nodes' smart service. This smart service accepts the UUID of a specific node along with the process id. Since the UUID (of the start event for the process that needs to be restarted automatically) is constant in this scenario, thereby relaying on the process id as the other parameter, I was able to programmatically trigger the process.

    Thank you all for chiming in on this !

Reply
  • Fortunately we have this process id stored in the database thereby it made my task easier in a way to achieve the solution. Here is what I did - I relayed on the process id that was extracted using a query on db to the 'Start All Nodes' smart service. This smart service accepts the UUID of a specific node along with the process id. Since the UUID (of the start event for the process that needs to be restarted automatically) is constant in this scenario, thereby relaying on the process id as the other parameter, I was able to programmatically trigger the process.

    Thank you all for chiming in on this !

Children
No Data