Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Stardust/Knowledge Base/Integration/Events/Trigger Types"

Line 1: Line 1:
__NOTOC__
 
 
 
Depending on the trigger type the trigger message may be parameterized with additional data. Such trigger parameters are provided at runtime in form of access points allowing for parameter mappings. Parameter mappings may be used to initialize workflow data of the triggered process instance and are configured in the Parameter Mapping panel of the triggers properties dialog. Please refer to the specific trigger type section in this chapter to obtain a detailed description on how to set up the parameter mappings accordingly.  
 
Depending on the trigger type the trigger message may be parameterized with additional data. Such trigger parameters are provided at runtime in form of access points allowing for parameter mappings. Parameter mappings may be used to initialize workflow data of the triggered process instance and are configured in the Parameter Mapping panel of the triggers properties dialog. Please refer to the specific trigger type section in this chapter to obtain a detailed description on how to set up the parameter mappings accordingly.  
  
*Manual Trigger
+
== Manual Trigger  ==
*Timer Based Trigger
+
*JMS Trigger
+
*Mail Trigger 
+
 
+
<br>
+
 
+
==== Manual Trigger  ====
+
  
 
[[Image:Stardust Integration ManualTrigger1.jpg|left|60x50px]]  
 
[[Image:Stardust Integration ManualTrigger1.jpg|left|60x50px]]  
Line 30: Line 21:
 
*Select the manual trigger
 
*Select the manual trigger
  
<br>
+
<br>  
  
 
[[Image:Stardust Integration ManualTrigger3.png|350x225px]]  
 
[[Image:Stardust Integration ManualTrigger3.png|350x225px]]  
Line 36: Line 27:
 
Now the participant is entered in the '''Manual Trigger Participants '''section in the triggers model property page.  
 
Now the participant is entered in the '''Manual Trigger Participants '''section in the triggers model property page.  
  
&nbsp;
+
== Timer Based Trigger  ==
 
+
==== Timer Based Trigger  ====
+
  
 
This section describes how to configure and use Timer Base Trigger inside IPP.  
 
This section describes how to configure and use Timer Base Trigger inside IPP.  
Line 47: Line 36:
 
*Start the daemon.
 
*Start the daemon.
  
<br>
+
<br>  
  
<u>'''''a) Design the Model'''''<br></u>Let’s take an example which has a timer trigger and a manual activity. The trigger is scheduled to run at specified time which will create a process instance.  
+
'''<u>Design the Model</u>'''<u><br></u><br>
 +
 
 +
Let’s take an example which has a timer trigger and a manual activity. The trigger is scheduled to run at specified time which will create a process instance.  
  
 
[[Image:Stardust Integration TimerTrigger1.png|350x225px]]  
 
[[Image:Stardust Integration TimerTrigger1.png|350x225px]]  
Line 55: Line 46:
 
<br>The trigger requires setup some properties before it can be used. Let’s assume that we want to run the trigger once on 1st April 2011 at 12:48PM then the properties should be configured as:  
 
<br>The trigger requires setup some properties before it can be used. Let’s assume that we want to run the trigger once on 1st April 2011 at 12:48PM then the properties should be configured as:  
  
<br>
+
<br>  
  
 
· Right click ‘Timer Based Trigger 1’ --&gt;Properties  
 
· Right click ‘Timer Based Trigger 1’ --&gt;Properties  
Line 61: Line 52:
 
· Set the required values  
 
· Set the required values  
  
<br>
+
<br>  
  
 
[[Image:Stardust Integration TimerTrigger2.png|600x200px]]  
 
[[Image:Stardust Integration TimerTrigger2.png|600x200px]]  
  
<br>
+
<br>  
  
<br>
+
<br>  
  
 
In the above screenshot, the trigger will run only once at 12:48PM on 1st April 2011(of course assuming that Timer Trigger Deamon is running at that time – Please check below in the documentation as how this deamon is started from the Portal ).  
 
In the above screenshot, the trigger will run only once at 12:48PM on 1st April 2011(of course assuming that Timer Trigger Deamon is running at that time – Please check below in the documentation as how this deamon is started from the Portal ).  
  
<br>
+
<br>  
  
 
Take another example where we want to run the scheduler on a regular interval, then it would require to mention '''Periodicity '''also as shown below:  
 
Take another example where we want to run the scheduler on a regular interval, then it would require to mention '''Periodicity '''also as shown below:  
  
<br>
+
<br>  
  
 
[[Image:Stardust Integration TimerTrigger3.png|600x200px]]  
 
[[Image:Stardust Integration TimerTrigger3.png|600x200px]]  
Line 83: Line 74:
 
Below is the screenshot from Process Portal. We can see those process instances were created at every 2 min.  
 
Below is the screenshot from Process Portal. We can see those process instances were created at every 2 min.  
  
[[Image:Stardust Integration TimerTrigger4.png|650x165px]]<br>
+
[[Image:Stardust Integration TimerTrigger4.png|650x165px]]<br>  
  
<br>
+
<br>  
  
 
Also we can specify the '''stop time '''at which the trigger will stopping performing the job. It can be configured like this:  
 
Also we can specify the '''stop time '''at which the trigger will stopping performing the job. It can be configured like this:  
  
[[Image:Stardust Integration TimerTrigger5.png|650x170px]]<br>
+
[[Image:Stardust Integration TimerTrigger5.png|650x170px]]<br>  
  
<br>
+
<br>  
  
 
The trigger will instantiate the first process at 1:05PM on 1st April 2011 and keeps instantiating at every 5min and then the trigger will be stopped at 1:16PM on 1st April 2011 – so no more instance will be created after 1:16PM for this configuration.  
 
The trigger will instantiate the first process at 1:05PM on 1st April 2011 and keeps instantiating at every 5min and then the trigger will be stopped at 1:16PM on 1st April 2011 – so no more instance will be created after 1:16PM for this configuration.  
  
<br>
+
<br>  
  
 
Below is the screenshot from Process Portal. We can see those process instances were created at every 5 min until 1:16PM and then no more instance available as trigger was supposed to stop at 1:16PM  
 
Below is the screenshot from Process Portal. We can see those process instances were created at every 5 min until 1:16PM and then no more instance available as trigger was supposed to stop at 1:16PM  
Line 101: Line 92:
 
[[Image:Stardust Integration TimerTrigger6.png|800x180px]]  
 
[[Image:Stardust Integration TimerTrigger6.png|800x180px]]  
  
<br>
+
<br>  
  
.<br>
+
<u>'''Start the Daemon'''</u>''<br>''  
 
+
'''b) '''''<b>Start the Daemon</b><br>''
+
  
 
The “Time Trigger Daemon” is to be started to work the trigger. This can be done from Administration perspective. Under Daemon like, this daemon is displayed.  
 
The “Time Trigger Daemon” is to be started to work the trigger. This can be done from Administration perspective. Under Daemon like, this daemon is displayed.  
  
[[Image:Stardust Integration Trigger DaemonList.png|750x225px]]<br>
+
[[Image:Stardust Integration Trigger DaemonList.png|750x225px]]<br>  
  
<br>
+
<br>  
  
 
So basically '''following steps '''are to be performed in order to get Timer Trigger working:  
 
So basically '''following steps '''are to be performed in order to get Timer Trigger working:  
Line 125: Line 114:
 
· Go to administration perspective and start “Timer Daemon” before start time of the trigger.  
 
· Go to administration perspective and start “Timer Daemon” before start time of the trigger.  
  
==== <br>JMS Trigger  ====
+
== <br>JMS Trigger  ==
  
 
[[Image:Stardust Integration JMSTrigger1.png|60x50px]]  
 
[[Image:Stardust Integration JMSTrigger1.png|60x50px]]  
  
<br>
+
<br>  
  
 
An incoming message starts a process passing all the information contained in the body of the message as input data.  
 
An incoming message starts a process passing all the information contained in the body of the message as input data.  
Line 137: Line 126:
 
[[Image:Stardust Integration JMSTrigger2.png|550x150px]]  
 
[[Image:Stardust Integration JMSTrigger2.png|550x150px]]  
  
<br>
+
<br>  
  
 
Choose the Message Type as shown in the above screenshot.  
 
Choose the Message Type as shown in the above screenshot.  
Line 145: Line 134:
 
[[Image:Stardust Integration JMSTrigger3.png|650x175px]]  
 
[[Image:Stardust Integration JMSTrigger3.png|650x175px]]  
  
<br>
+
<br>  
  
 
After this configuration we can map the defined parameters to data in our process definition. Select Parameter Mapping and push the Add button to set up a new parameter mapping. A new dialog appears where you fill in the following parameters:  
 
After this configuration we can map the defined parameters to data in our process definition. Select Parameter Mapping and push the Add button to set up a new parameter mapping. A new dialog appears where you fill in the following parameters:  
Line 155: Line 144:
 
[[Image:Stardust Integration JMSTrigger4.png|720x170px]]&nbsp;  
 
[[Image:Stardust Integration JMSTrigger4.png|720x170px]]&nbsp;  
  
<br>
+
<br>  
  
<br>
+
<br>  
  
 
[[Image:Stardust Integration JMSTrigger5.png|820x170px]]  
 
[[Image:Stardust Integration JMSTrigger5.png|820x170px]]  
  
To get the JMSTrigger working, we need to copy few XMLs as shown below in the screenshot. The CarnotEngine will listen to CarnotApplicationQueue and read the message from there.  
+
To get the JMSTrigger working, we need to copy few XMLs as shown below in the screenshot. The Engine will listen to CarnotApplicationQueue and read the message from there.  
  
 
[[Image:Stardust Integration JMSTrigger6.png|325x275px]]  
 
[[Image:Stardust Integration JMSTrigger6.png|325x275px]]  
Line 171: Line 160:
 
&nbsp; [[Image:Stardust Integration JMSTrigger7.png|275x175px]]  
 
&nbsp; [[Image:Stardust Integration JMSTrigger7.png|275x175px]]  
  
==== Mail Trigger  ====
+
== Mail Trigger  ==
  
 
&nbsp; [[Image:Stardust Integration MailTrigger1.jpg|60x50px]]  
 
&nbsp; [[Image:Stardust Integration MailTrigger1.jpg|60x50px]]  
Line 179: Line 168:
 
&nbsp; [[Image:Stardust Integration MailTrigger2.png|550x375px]]  
 
&nbsp; [[Image:Stardust Integration MailTrigger2.png|550x375px]]  
  
Figure: Mail Trigger Configuration<br>
+
Figure: Mail Trigger Configuration<br>
 +
 
 +
'''<u>Server Settings</u>'''<br>  
  
<u>'''Server Settings<br>'''</u>The following server settings are provided:  
+
The following server settings are provided:  
  
 
*Protocol: Choose between POP3 or IMAP4  
 
*Protocol: Choose between POP3 or IMAP4  
 
*Server: POP3 (or IMAP) server name  
 
*Server: POP3 (or IMAP) server name  
 
*User: Account name of the mail box  
 
*User: Account name of the mail box  
*Password: Matching password to the mail box account
+
*Password: Matching password to the mail box account<br>
  
<br>
+
'''<u>Mail Settings</u>'''
  
<u>'''Mail Settings'''<br></u>The following entry fields are provided to specify mail settings to filter for:  
+
The following entry fields are provided to specify mail settings to filter for:  
  
 
*'''Candidate Mails: '''Filter to specify the mails to be observed. Options are:
 
*'''Candidate Mails: '''Filter to specify the mails to be observed. Options are:
  
&nbsp;&nbsp;&nbsp;&nbsp; i. All existing Mails <br>&nbsp;&nbsp;&nbsp;&nbsp; ii. Mails not marked as seen<br>&nbsp;&nbsp;&nbsp;&nbsp; iii. New mails since last fetch <br>
+
&nbsp;&nbsp;&nbsp;&nbsp; i. All existing Mails <br>&nbsp;&nbsp;&nbsp;&nbsp; ii. Mails not marked as seen<br>&nbsp;&nbsp;&nbsp;&nbsp; iii. New mails since last fetch <br>  
  
 
*'''Predicates:''' Only the mails are accepted containing the pattern set in the according predicate entry. Please refer to the documentation on the javax.mail.search classes, for more detailed information about the string comparison. You can set the following predicates:
 
*'''Predicates:''' Only the mails are accepted containing the pattern set in the according predicate entry. Please refer to the documentation on the javax.mail.search classes, for more detailed information about the string comparison. You can set the following predicates:
Line 200: Line 191:
 
&nbsp;&nbsp;&nbsp;&nbsp; i. Sender Predicate: compares the string with the "From Address" header (see javax.mail.search.FromStringTerm). Note, that the string comparison is case-sensitive. <br>&nbsp;&nbsp;&nbsp;&nbsp; ii. Subject Predicate: compares the string with the "Message Subject" header (see javax.mail.search.SubjectTerm). Note, that the string comparison is case-insensitive. <br>&nbsp;&nbsp;&nbsp;&nbsp; iii. Body Predicate: searches on message body (see javax.mail.search.BodyTerm).  
 
&nbsp;&nbsp;&nbsp;&nbsp; i. Sender Predicate: compares the string with the "From Address" header (see javax.mail.search.FromStringTerm). Note, that the string comparison is case-sensitive. <br>&nbsp;&nbsp;&nbsp;&nbsp; ii. Subject Predicate: compares the string with the "Message Subject" header (see javax.mail.search.SubjectTerm). Note, that the string comparison is case-insensitive. <br>&nbsp;&nbsp;&nbsp;&nbsp; iii. Body Predicate: searches on message body (see javax.mail.search.BodyTerm).  
  
*&nbsp;'''MailBox Actions'''&nbsp;: this means the action after mails are received. Options are: <br>&nbsp; i. Leave mail as is <br>&nbsp; ii. Mark mail as seen <br>&nbsp; iii. Remove mail from server
+
*&nbsp;'''MailBox Actions'''&nbsp;: this means the action after mails are received. Options are: <br>&nbsp; i. Leave mail as is <br>&nbsp; ii. Mark mail as seen <br>&nbsp; iii. Remove mail from server<br>
  
<br>
+
<u>'''Parameter Mapping'''</u>  
  
<u>'''Parameter Mapping<br>'''</u>Select '''Parameter Mapping '''on the left side of the '''Properties '''dialog to configure the'''Parameter Mapping'''. In this case you can map parameters of a mail object to a data modeled in the process. In the figure below you find an example on how to access the string content of a received mail.  
+
Select Parameter Mapping on the left side of the Properties dialog to configure theParameter Mapping. In this case you can map parameters of a mail object to a data modeled in the process. In the figure below you find an example on how to access the string content of a received mail.  
  
[[Image:Stardust Integration MailTrigger3.jpg|400x275px]]<br>
+
[[Image:Stardust Integration MailTrigger3.jpg|400x275px]]<br>  
  
 
'''Note:''' The “Mail Trigger Daemon” has to be started to get it working.
 
'''Note:''' The “Mail Trigger Daemon” has to be started to get it working.

Revision as of 01:21, 6 December 2011

Depending on the trigger type the trigger message may be parameterized with additional data. Such trigger parameters are provided at runtime in form of access points allowing for parameter mappings. Parameter mappings may be used to initialize workflow data of the triggered process instance and are configured in the Parameter Mapping panel of the triggers properties dialog. Please refer to the specific trigger type section in this chapter to obtain a detailed description on how to set up the parameter mappings accordingly.

Manual Trigger

Stardust Integration ManualTrigger1.jpg

 

 

 

Open the Properties dialog of a created Manual Trigger to change its properties. There you can choose a participant from the list of the Manual Trigger pane.

 
Stardust Integration ManualTrigger2.png


Another possibility to assign a participant to a manual trigger is to connect the participant via transition to the trigger in the diagram:

  • In the diagram toolbar palette select Connect.
  • Select the participant.
  • Select the manual trigger


Stardust Integration ManualTrigger3.png

Now the participant is entered in the Manual Trigger Participants section in the triggers model property page.

Timer Based Trigger

This section describes how to configure and use Timer Base Trigger inside IPP.

The steps are:

  • Design & Deploy the model which uses Timer Trigger
  • Start the daemon.


Design the Model

Let’s take an example which has a timer trigger and a manual activity. The trigger is scheduled to run at specified time which will create a process instance.

Stardust Integration TimerTrigger1.png


The trigger requires setup some properties before it can be used. Let’s assume that we want to run the trigger once on 1st April 2011 at 12:48PM then the properties should be configured as:


· Right click ‘Timer Based Trigger 1’ -->Properties

· Set the required values


Stardust Integration TimerTrigger2.png



In the above screenshot, the trigger will run only once at 12:48PM on 1st April 2011(of course assuming that Timer Trigger Deamon is running at that time – Please check below in the documentation as how this deamon is started from the Portal ).


Take another example where we want to run the scheduler on a regular interval, then it would require to mention Periodicity also as shown below:


Stardust Integration TimerTrigger3.png


The trigger will instantiate the first process at 1:00PM on 1st April 2011 and then repeating at every 2 minutes. (of course assuming that Timer Trigger Deamon is running at that time – Please check below in the documentation as how this deamon is started from the Portal ).

Below is the screenshot from Process Portal. We can see those process instances were created at every 2 min.

Stardust Integration TimerTrigger4.png


Also we can specify the stop time at which the trigger will stopping performing the job. It can be configured like this:

Stardust Integration TimerTrigger5.png


The trigger will instantiate the first process at 1:05PM on 1st April 2011 and keeps instantiating at every 5min and then the trigger will be stopped at 1:16PM on 1st April 2011 – so no more instance will be created after 1:16PM for this configuration.


Below is the screenshot from Process Portal. We can see those process instances were created at every 5 min until 1:16PM and then no more instance available as trigger was supposed to stop at 1:16PM

Stardust Integration TimerTrigger6.png


Start the Daemon

The “Time Trigger Daemon” is to be started to work the trigger. This can be done from Administration perspective. Under Daemon like, this daemon is displayed.

Stardust Integration Trigger DaemonList.png


So basically following steps are to be performed in order to get Timer Trigger working:

· Design the model which uses Timer Trigger

· Specify proper start, stop & periodicity for the trigger.

· Deploy the model.

· Start the server.

· Go to administration perspective and start “Timer Daemon” before start time of the trigger.


JMS Trigger

Stardust Integration JMSTrigger1.png


An incoming message starts a process passing all the information contained in the body of the message as input data.

To change the specific properties of a JMS trigger, open its properties dialog, where you can - among other options -choose the type of message and add parameters of the JMS message.

Stardust Integration JMSTrigger2.png


Choose the Message Type as shown in the above screenshot.

And then add the parameter of the JMS message – Location is important (Body or Header) as shown below in the screenshot.

Stardust Integration JMSTrigger3.png


After this configuration we can map the defined parameters to data in our process definition. Select Parameter Mapping and push the Add button to set up a new parameter mapping. A new dialog appears where you fill in the following parameters:

  • Data: select from a list of valid data, mandatory.
  • Parameter: select from a list of parameters, mandatory.
  • Access Path: select a valid dereferentiation path for the parameter type via access path browser, not mandatory

Stardust Integration JMSTrigger4.png 



Stardust Integration JMSTrigger5.png

To get the JMSTrigger working, we need to copy few XMLs as shown below in the screenshot. The Engine will listen to CarnotApplicationQueue and read the message from there.

Stardust Integration JMSTrigger6.png

And then, there are few JARs that are to be copied in WEB-INF lib eg If we are using ActiveMQ then ActiveMQ specific JARs has to be copied.

Below is a sample model that uses JMS Trigger.

  Stardust Integration JMSTrigger7.png

Mail Trigger

  Stardust Integration MailTrigger1.jpg

An incoming email starts a process passing all the information contained in the email as input data. To change the properties of the mail trigger, open its properties dialog.

  Stardust Integration MailTrigger2.png

Figure: Mail Trigger Configuration

Server Settings

The following server settings are provided:

  • Protocol: Choose between POP3 or IMAP4
  • Server: POP3 (or IMAP) server name
  • User: Account name of the mail box
  • Password: Matching password to the mail box account

Mail Settings

The following entry fields are provided to specify mail settings to filter for:

  • Candidate Mails: Filter to specify the mails to be observed. Options are:

     i. All existing Mails
     ii. Mails not marked as seen
     iii. New mails since last fetch

  • Predicates: Only the mails are accepted containing the pattern set in the according predicate entry. Please refer to the documentation on the javax.mail.search classes, for more detailed information about the string comparison. You can set the following predicates:

     i. Sender Predicate: compares the string with the "From Address" header (see javax.mail.search.FromStringTerm). Note, that the string comparison is case-sensitive.
     ii. Subject Predicate: compares the string with the "Message Subject" header (see javax.mail.search.SubjectTerm). Note, that the string comparison is case-insensitive.
     iii. Body Predicate: searches on message body (see javax.mail.search.BodyTerm).

  •  MailBox Actions : this means the action after mails are received. Options are:
      i. Leave mail as is
      ii. Mark mail as seen
      iii. Remove mail from server

Parameter Mapping

Select Parameter Mapping on the left side of the Properties dialog to configure theParameter Mapping. In this case you can map parameters of a mail object to a data modeled in the process. In the figure below you find an example on how to access the string content of a received mail.

Stardust Integration MailTrigger3.jpg

Note: The “Mail Trigger Daemon” has to be started to get it working.

Back to the top