Process interaction
Update from within a running ticket
It is possible to update a datastore from a ticket by running webservices.
Go to the admin page and then to adapters

Select the tab “Web Services “
Click on ‘edit icon’ per webservice call, or add new one
To ADD an Address Book Entry
click the edit button of the webservice call “Datastore Add Address Book Entry”
Now you’ll see this screen:
Webservice details
URL: please insert here the client SSP url, so it comes to:
http://dev.ssp7.smt-x.com/common/webservice/datastore.asmx
Cat Type: to add an Address Book Entry, please select insert
XSLT In:
a- get the name of the parameter from the datastore
b-make the hash tag trough: http://dev.ssp7.smt-x.com/forms/test.aspx (login: query)
c-Select HashCheck and enter the parameter, click the button “getHash”
The hashtag appears and is ready to be copied
d- Paste the Hash Tag in the XSLT In code
Webservice Call Fields
The field names are the datastore fields
To UPDATE an Address Book Entry
This is used to adjust fields. Go to Admin > adapters

Edit Datastore Update Address Book entry
Search a field: for a name with filterName or for an email with FilterEmail or for a location with FilterLocation . Update a field with: UpdateName or UpdateEmail or UpdateLocation
In a process
Go to the admin page and select processes
To add a process, click the button :
Or to add a step in a process, edit the process:
Select the Edit Steps tab
Add a step where needed:
Select Webservice Call in General Settings:
Select the datastore in Webservice Call and click on the apply button:
Select the necessary fields and and them with the ADD button
Fill in the current fields:
Example for Name: #REPLACE-FORMFIELD-Building|Name# ; Select Form field and Name:
Get data from Parameter in process
You can now fetch data from a Datastore Parameter, in a process. The WebService needs a filterField, and potentially a SortField.
An example is made in our DEV : Datastore - GET - Address Book
Components:
URL : http://dev.ssp7.smt-x.com/Common/webservice/datastore.asmx
Call Type: RetrieveList
Return Type: DataTable
XLST In: see example - note the HASH ! - see full sample below
XSLT Out : see example - no Hash here - see full sample below
Web Service Call Headers: none
WebService Call Fields:
- Filter<FieldName>: Will be needed to find the correct value in the Datastore Parameter. - Sort<FieldName>: (optional) : sort the results by this field, the first entry will be chosen.
Only 1 entry can be chosen ! Multiple filters can be selected sample form : http://dev.ssp7.smt-x.com/Forms/Admin/formDetail.aspx?id=291 sample process: http://dev.ssp7.smt-x.com/Workflow/Admin/ProcessAddEdit.aspx?saved=true&genericid=233
The process first pulls data based on the field in the form. Next, it asks in the process to select an email address and will then return the Name & Location. sample ticket : 2255

It is a bit complex how to set up the call in the process. The step type is 'Webservice Call', but when you select a 'GET'-webservice, the Form section appears. This allows you to fetch the fields from the datastore that you want (and use them as 'previously entered fields'). Note: add the fieldname (of the datastore parameter) in the new textfield, labeled 'Field name from webservice call'.
[edit]XSLT In Sample
<?xml version='1.0'?> <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> <xsl:template match='/SSPAdapterCall'> <soapenv:Envelope xmlns:soapenv='http://www.w3.org/2003/05/soap-envelope' xmlns:dat="http://smt-x.com/SSP/Common/DataStore"> <soapenv:Header/> <soapenv:Body> <dat:getEntries> <dat:p_strParameterName>Address Book</dat:p_strParameterName> <dat:p_strHash>1E6F5F9F37A94F572DEB3BCB87CF53635741C43C</dat:p_strHash> <dat:p_blnIsHidden>false</dat:p_blnIsHidden> <dat:p_strSortFieldName></dat:p_strSortFieldName> <dat:p_arr_strExistingNameValues> <xsl:for-each select="Field"> <xsl:variable name="FieldName" select="@Name"/> <xsl:if test="starts-with($FieldName, 'Filter')"> <dat:string> <xsl:value-of select="substring($FieldName, 7)" /> </dat:string> <dat:string> <xsl:value-of select="." /> </dat:string> </xsl:if> </xsl:for-each> </dat:p_arr_strExistingNameValues> </dat:getEntries> </soapenv:Body> </soapenv:Envelope> </xsl:template> </xsl:stylesheet>
[edit]XSLT Out Sample
<?xml version='1.0' ?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:soap='http://www.w3.org/2003/05/soap-envelope' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:ds='http://smt-x.com/SSP/Common/DataStore'> <xsl:template match="/soap:Envelope/soap:Body/ds:getEntriesResponse"> <SSPAdapterResult> <Fields> <xsl:for-each select='//xsd:element[@name="Data"]/xsd:complexType/xsd:sequence/xsd:element'> <Field> <xsl:value-of select='@name' /> </Field> </xsl:for-each> </Fields> <Rows> <xsl:for-each select='//DocumentElement/Data'> <Row> <xsl:for-each select='*'> <Field> <xsl:attribute name="name"> <xsl:value-of select="local-name()" /> </xsl:attribute> <xsl:value-of select='.'/> </Field> </xsl:for-each> </Row> </xsl:for-each> </Rows> </SSPAdapterResult> </xsl:template> <xsl:template match="/soap:Envelope/soap:Body/soap:Fault"> <Error>code:<xsl:value-of select='soap:faultcode' /> <xsl:value-of select='soap:Code/soap:Value' /> - string:<xsl:value-of select='soap:faultstring' /> <xsl:value-of select='soap:Reason/soap:Text' /> </Error> </xsl:template> </xsl:stylesheet>
Last updated
Was this helpful?