03-04-2013 08:01 AM
Hi,
Is there a way to execute a system task from within the Unity API? I could not find anything in the SDK related to Systems Tasks.
Thanks
Anthony
03-04-2013 08:17 AM
Anthony,
You will need to look under the Hyland.Unity.Workflow namespace. There you will find the TaskList.Execute().
Regards,
03-04-2013 08:25 AM
Hi Daniel,
I did see that but the TaskList.Execute method requires a queue and document object and a system task can be execute on a document that may not be in any workflow queues so there wouldn't be a queue object to use.
Thanks
Anthony
03-05-2013 03:41 AM
Anthony,
Sorry about that. I was thinking of an Ad-hoc task which can be executed. However, we don't have any methods to execute a system task.
Regards,
03-16-2016 01:35 PM
I'm not sure if a method to execute a system task has been added to the API since this post, but I also ran into the need to do this. In my case, I needed a way to programmatically create chart objects for chartless documents that would never get resolved because they will never receive the HL7 data to create a chart object for them.
As a workaround, I wrote a Unity script that (1). queries the database for the documents I wish to process and (2) adds them to a lifecycle that performs the work I need done (sends an ADT A01 mesage to the localhost for each document).
To provide a way to execute the script in the GUI, I created a dummy document type called "Workflow Script Trigger” and also a dummy lifecycle that does nothing but run the script. Then, I created a dummy system task for the dummy document that adds it to the dummy lifecycle. When I need to run the process, I just open the document and click the dummy system task.
I am not sure if there is a more elegant way to handle this but it meets my needs.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.