Update or access variable during workflow

22 views
Skip to first unread message

Ferran C

unread,
Jun 9, 2022, 9:06:00 AM6/9/22
to Opencast Users
Hello everybody again,

I am trying to obtain error information during the execution of a workflow. My objective is to notify through a POST when a workflow has an error, indicating which operation has failed (eg encode)
I have tried the operation "Mattermos Notification" and "HTTP Notify" but I have not been able to access the variables as it does "Send email Workflow Operation" with a template:  (Workflow failed in operation: ${failedOperation.position}-${failedOperation.template}) .

Is there a way to access these variables in "Mattermost Notification" or "HTTP Notify" and send them in the body of the message.


Another solution that I have thought is declare a variable at the beginning of the workflow and update its value when you access each operation, so that in case of an error obtain what it was. In this case, the problem I have is that I don't know how to update the value of the variable in each operation, and how to access the stored value to send it in the body of the "Mattermost Notification" or "HTTP Notify" message.


Any help with accessing workflow variables and modifying them in operations?
Is there any other way to get the error from a workflow and be able to call it back to a RES API?

Best regards.

Greg Logan

unread,
Jun 17, 2022, 6:56:21 PM6/17/22
to Opencast Users
Hi Ferran,

Looking at the code, the email notification handler is *far* more complex and explicitly pulls that extra data in.  The closest is the Mattermost handler, which support the following keys:
"%i" -> workflow instance ID
"%s" -> workflow instance state
"%o" -> current operation ID
G

--
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.
Reply all
Reply to author
Forward
0 new messages