Run only one workflow when record producer is ordered

AnkurBaruah
Tera Contributor

I have a record producer and it has a script to run a specific workflow when a record is created in INCIDENT Table. But if someone order the record producer,only one workflow needs to be triggered. Not the default workflow that is created when a new Incident record is created. Otherwise, there would be two workflows running.

 

Can anyone help me out?

3 REPLIES 3

Uncle Rob
Kilo Patron

There is no default workflow for Incident.
So if you've got a custom one that's conflicting, you need to refine your conditions.

Also, a MUCH better way to trigger flow based on Record Producers is to use the table sc_item_produced_record as the trigger.  This table creates an entry any time a Record Producer is used, and stores references to both the source Record Producer and the generated task.  Its the easiest way to launch workflow specific to an RP

So you are saying I have to create a workflow having sc_item_produced_record as the trigger? and calling that workflow in my Record Producer script. But that would also eventually create Incident record creation workflow and would conflict with new workflow. Is that what I need to understand or am I got it wrong?

No.  I'm saying let your Record Producer create the record its supposed to, then have the FLOW (not legacy workflow) start based on creation of  sc_item_produced_record.   No need to launch flow from script at all.