Triggering Aegis Workflows from Remote Systems

Triggering Aegis Workflows from Remote Systems

Aegis Adapters provide the most integrated method of interacting with a remote system. They can provide Resource Management, Activities, Connection Management, Events, Namespace Access, Stored Credentials etc. Their main drawback is simply the time required to develop an adapter compared to a set of standalone activities, a scripted or command line solution (in decreasing order of integration). Adapters then are only one method Aegis has to connect to remote systems.

Without an adapter if you want to monitor an external system for an 'event' for sure you can still do it. Events are used in Aegis to start workflows. Events are passed through a Correlation Engine which can correlate events from multiple sources to decide what workflows to run.

Sometimes even with an adapter a polling mechanism to collect events isn't always the best solution, an event push from the remote system may be a better solution depending on the circumstances.

Aegis workflow designers can also be faced with situations where Aegis workflows are performing modularized automation tasks for a different system rather than being the owner of an entire process itself. Most software systems include some form of automation capability often simple fire and forget tasks like running a command-line, sending and email, running a script etc. and its these capabilities that can be harnessed to send events to Aegis.

Here we will find out how we can use these methods to interact with Aegis to trigger workflows.

Send an Email.
The simplest methods and as a result probably my favorite method of triggering an Aegis workflow remotely (be that a human or some software system) is to send a formatted email to a mailbox monitored by Aegis. Aegis detects the email and generates an event of type 'Exchange New Message Event' or 'Email Message' depending on the mailbox type. Email events in Aegis like any other event are passed through the correlation engine to see if it matches any trigger rules and is handled accordingly by the Aegis Engine.

Aegis supports Microsoft Exchange mails boxes, POP3 and IMAP (both with SSL option) mailboxes. A trigger can be defined on something simple like the email subject containing a particular string to more complex rule based on matches in the email body or other message fields.

Sending an email is also generally one of the actions that the majority of software systems I have used can do.

The Aegis Event Generator.
There is an installation option in the Aegis Installer to install an event Generator. It installs a service on windows which allows it to connect directly with Aegis to Generate Events based on a pre-formatted file. The Generating system just needs to be able to format the file and run a command line. The event generator creates an event of type 'Aegis Generic Integration Event' in Aegis.

A new row in a database table.
The Aegis Database adapter can be used to generate a 'Generic Database Monitor Table Change' event. This can be done with no extra work on the database side if for example the external system writes log/audit data to a table to indicate an error condition, but equally a new row indicating a new object like a user could be used to start a user provisioning workflow. Essentially this is what an adapter like the AppManager adapter is doing, checking for new rows in an events table and forwarding them to Aegis.

Start a Parameter less Aegis Workflow via Aegis WebService.
If the automation capability of the remote system is limited and creating specific formatting of messages is difficult, send an SOS message to Aegis to start a workflow can be a handy tool. Aegis picks up the event and goes to the remote system to figure out why the SOS and what to do about it.

There are many Aegis Webservices remote systems can communicate with and I will go into more detail on some of these and how to use them in a later post. One of these webservice methods is to start a manual process - in a similar method to the 'Execute Process' activity. Most Processes in this category either do something hard-coded (as it takes in no external info to start it), or when it starts goes and collects information which defines what it does which can be a really neat solution.

Generate an Event via Aegis Webservice
A more common method used in the Webservice for starting workflows is to create an event which again allows the correlation engine to decide if that event matches any definitions and which if any processes to start or append/block the event to. These can be more complex for a remote system to handle but we more often will come across this in a custom Web Form where there is different levels of interaction with Aegis Webservices.

A Polling Workflow
Events can be generated in Aegis workflows using the 'Create Aegis event' activity. So if you can detect a condition using a workflow then you can create an event. combining the Scheduler to trigger a polling workflow and a loop with a pause and query for a set duration and workflow lifetime, you are all set to pull events and still be able to correlate data without a specific adapter. It is my least favored option though - maintaining a potentially high frequency workflow and synchronization when one workflow ends and another starts will take some thought. Technically though its done from the Aegis side so doesn't count!

These may give you some ideas as to how to get your systems generating events in Aegis. While you may never want to run an automation workflow on that system, the event which is generated may be important in triggering the correct workflow - correlating for example data between heterogeneous systems to narrow down a problem to contact the correct person - nice!

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2015-11-30 17:01
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.