Sending information without using a web service
We recommend that you use the web service method to communicate with LPM (see Linking to Ivanti Process Manager using a web service). However, you can also integrate with LPM using the Event Generator behaviour described in this section. This method is more complicated to set up, and is less efficient, but it also demonstrates a method that you can use with other process tools that do not provide a web service interface.
Before you can start, you need to create a database listener in LPM.
To create the database listener:
- In the Event listeners explorer, create a new folder, then right-click it and click New database listener.
- Display the properties dialog for the new database listener.
- On the Details tab, select the workflow that you created above as the workflow to start when the conditions of the event listener are met.
- On the LPM Core Server, create an ODBC data source for the Service Desk or Asset Manager database, then enter the details for this data source on the Settings tab.
- In the Select query box, type the select statement that will identify the event. This query will be of the form:
select * from tps_event_queue
where tps_process_status = 0
and tps_class_type_guid = '{md_guid}'
in this query, md_guid is the guid stored in the md_guid column of the Service Desk or Asset Manager database table md_class_type for the row where md_title is the name of the collection that you created for the business object that creates the event (see Linking to Ivanti Process Manager using a web service). - Click Get database columns.
This makes the database columns from the Event Queue table available to LPM. - In the Update query box, type:
update tps_event_queue set tps_process_status = 1 where tps_id = - With the cursor at the end of the update query, click Insert column.
The Insert from columns dialog appears. - Click tps_id, then click Insert.
The column is added to the query, and reads:
update tps_event_queue set tps_process_status = 1 where tps_id = {|tps_id|} - On the Mappings tab, in the External unique system identifier list, click tps_id.
- Click Autogenerate field mappings.
- Save the database listener.
When you have created the database listener in LPM, you can configure Event Manager to use it.
To set up an object for integration with LPM:
- In Console, start the Object Designer component and select the module that you want to use for the service request, for example, Request Management.
- In the Actions list, click New Business Object.
The Behaviour Selection dialog appears, asking if you want to specify a behaviour. - Click Yes.
The Behaviour Selection dialog appears. - In the Available Items list, select Event Generator, then click .
Event Generator moves to the Selected Items list. - Click OK.
The Behaviour Selection dialog closes. - Type a name for the object, for example, Service Request, then click to save the changes to the object.
You are asked if you want to create the Name attribute. - Click Yes, then add any further attributes you require to the object.
Unlike most behaviours, you can remove the Event Generator behaviour from a saved object at a later date. Click alongside Behaviours in the Properties grid to redisplay the Behaviour Selection dialog, then select Event Generator in the Selected Items list, and click .
When you have created the object, there are two further steps that you need to complete before you can use it as part of a request fulfilment process. You need to relate it to the Top Level object for the module, and set the Is Owner value to True for that relationship on your new object. This enables Event Manager to relate the business object with the instance of the process that created it.
You can add the Event Generator behaviour to any object, not only those related to a top-level object. However, we recommend that you use this behaviour only as part of a process, as described in this document. In particular, avoid adding this behaviour to objects that are automatically updated by Service Desk or Asset Manager, such as User. The User record is updated every time the user logs in, so if you add the Event Generator behaviour to the User object, then a new row would be added to the Queue table every time a user logs in.
To relate your object to the Top Level object:
- In the Business Objects tree of Object Designer, select the Top Level object for the module that contains your new object. (For example, Request in the Request Management module.)
- Drag this object onto the new Service Request object that you made in the previous procedure.
You are told that a relationship has been created, and asked if you want to be able to access all related instances of Service Request from Request. - Click Yes.
A relationship to Incident appears on the Service Request object (), and a collection of Service Requests appears on the Request object ().
We now need to set Request as the owner of Service Request, so that when you create a Service Request, LPM knows the specific Request identifier that corresponds with each Service Request. - In the Business Objects tree, double-click the Service Request object you have just created.
The attributes for the object appear in the Attributes tree. - In the Attributes tree, select the Request relationship ().
- In the Properties grid, set Is Owner to True, then save the changes.
You now need to create the action that will be used in Process Designer to create the Service Request.
To create the Service Request action:
- In Object Designer, display the Request object.
- In the Attributes list, select Service Request Collection, then in the Actions list, click Manage Actions.
The Manage Actions window appears. - Click Add.
A new action is added. - In the Title box, type the name of the action that will create a new Service Request item on the Request. For example, type Create Service Request.
- In the Action type list, click Create Related.
- Click OK, then save the changes to the object.
Setting up attributes to pass information to LPM
You can configure a Service Desk or Asset Manager object that has the Event Generator behaviour to pass some of its attributes as parameters to LPM. LPM can then use these parameters to control its workflows. To do this, you add Event Attribute Index values to attributes on objects that have the Event Generator behaviour, such as your Service Request object.
To configure the Event Attribute Index for your object:
- In Object Designer, select the attribute that you want to pass as a parameter to LPM.
- In the Properties grid, type a number between 1 and 20 in the Event Attribute Index field.
The parameters will appear in LPM as tps_attribute1 (for the object where the Event Attribute Index field is set to 1) through tps_attribute20.
Strings with Max. Length set to -1 must have an Event Attribute Index set to 16 through 20.
Because of this, in LPM, tps_attribute1 through tps_attribute15 can contain up to 100 characters, whereas tps_attribute16 through tps_attribute20 can contain unlimited nvarchar values.
The Event Attribute Index property is not available for the data type Attachment.
Do not use the same index number more than once on the same object.
- Repeat for any other required attributes, then click .