Hi Zafiris, that's a good trick, thanks for sharing,
In my case the optional unstructured task is repeteable which make things a bit more complex as you need to be switching on and off the variable in the shared BO.
However, I still prefer a cleaner implementation using a SF. It should be possible as there is a documented JS API for that.
Does anybody knows how to use that API? why am I having unresolved references in the API?
I cannot do:
var properties = new tw.object.ActivityListProperties();
should I add any JS module as a File in order to use the API?
------------------------------
Eduardo Izquierdo Lázaro
Automation Architect
DECIDE
MADRID
+34609893677
------------------------------
Original Message:
Sent: Wed August 04, 2021 02:29 AM
From: ZAFIRIS KERAMIDAS
Subject: How to start an optional unstructured task by code using JavaScript API?
A technique I have used is leveraging the shared business object features like so:
1. The ad-hoc activity is configured to start automatically based on a precondition expression e.g. a variable (which is part of a shared business object) becomes true
2. The human task sets this variable when user clicks "Start Task". Remember to also set "Update content objects and shared business objects when saving the execution context"
------------------------------
ZAFIRIS KERAMIDAS
------------------------------