Workflow - info return from complete event

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
CathyC
Posts: 469
Joined: November 16th, 2021, 11:15 am
Contact:

Workflow - info return from complete event

Unread post by CathyC »

For a workflow, in a method, an "Execute Workflow" service needs to be ran. This will move it to the next status and run the Complete Event on its current status. Here is what that looks like in the logs of the Execute Workflow service
image.png
It cant communicate anything about the final state of the complete event. It returns what status it moves to, but it cant tell anything about what happened in the Complete Event. This is a really good setup when the Complete Event was only going to send an email (very simple workflow use), but for more complex uses, it is necessary to know what happens when it runs.

This could be relevant when:
  • We need to know if the sent email was succesful
  • the complete status is performing some validation and when it fails we need to tell the user why it failed
image.png
See in this workflow, if the workflow request is at "SupplyChainFinance", when the executeworkflow service is ran, it will go to the "CostingIntegration" status and run the arrival event. That status performs an action and if it errors, automatically sends it to "ErrorCostingIntegration".
So this means that when the ExecuteWorkflow service was ran it could want to know info from:
  • SupplyChainFinance complete
  • CostingIntegration arrival
  • CostingIntegration complete
  • ErrorCostingIntegration arrival
  • ErrorCostingIntegration complete
The ExecuteWorkflow service is waiting for these to finish before it returns the logs, so I think it would be possible to return some message from any of those.


Can we make "MethodOutput", or some other service return, return a node in the execute workflow service to relay information back about what happened. This could be called from any of the Events that ran which were triggered by the execute workflow service.
word count: 289

Tags:
CathyC
Posts: 469
Joined: November 16th, 2021, 11:15 am
Contact:

Re: Workflow - info return from complete event

Unread post by CathyC »

I talked with the internal team on this. This would be a larger feature and it doesnt have a very large need, so other methods to get the output can be used. For the email feature, a record can be inserted/updated in a db with the status of the email sent. This has actually been another app custom that has been built when email communication is very important and the admin end users need confirmation of which emails were sent and what they contained. Using it here would also be helpful.

We can revisit this discussion if it becomes relevant again
word count: 102
Post Reply