No, it does not need to be tied to an object (the opposite even, since it has no contextual object information to bind to in the beginning).
If you WANT to start a process bound to an object, I suggest going the route of performing a XOG instead that touches the object-based record in such a way as to meet the conditions to automatically start a process, rather than kicking it off via WSDL invokeAction calls.
Of course, if you do start a process with an invokeAction call, you can then update one/more objects as you want, and they can have their own independent processes launched as appropriate too.
With respect to the two lines you ask about, they are just trying to extract the textual values from the 'request payload' coming from outside of Clarity, provided in the XML body used to start the process over the WSDL call so that the information can be accessed from within the process and its gel scripts. It is putting them into variables and then persisting them over the lifetime of the process so they can just be accessed in the rest of the script (or other steps/actions/scripts in the same process instance) via ${objCode} and ${objId} - maybe for use in queries or XOGs or similar.
Although in that specific example, it was probably meant to be
select="$objNode//@objType" in order for it to work - a minor typo.
Original Message:
Sent: 07-26-2019 05:06 PM
From: Naman Patel
Subject: Gel access to WSDL Process InvokeAction content
Does this process need to be tied to Object? Also, not sure how the following 2 statement will work. Is it based on object linked to process, Clarity takes care of providing information for object code and id?
<gel:set select="$objNode//@objCode" var="objCode" asString="true"/>
<gel:set select="$objNode//text()" var="objId" asString="true"/>
Original Message:
Sent: 12-05-2013 02:01 PM
From: Eugene Greiff
Subject: Gel access to WSDL Process InvokeAction content
This works for us.
Assuming your proces body looks like this:
<soapenv:Body>
<tns:Process>
<code>ContractProcessTest</code>
<request>
<objparam objType="contract">1A567B87</objparam>
</request>
</tns:Process>
</soapenv:Body>
In a step gel script:
<!-- Grab the xml passed in via the webService -->
<gel:getDocument var="requestXml"/>
<gel:set select="$requestXml" var="request" asString="true"/>
<gel:log>"entire xml in start =" ${request}</gel:log>
<!-- Pull off the objparam -->
<gel:set select="$requestXml//request/objparam" var="objNode" asString="false"/>
<!-- Pull off the objCode and objId -->
<gel:set select="$objNode//@objCode" var="objCode" asString="true"/>
<gel:set select="$objNode//text()" var="objId" asString="true"/>
<gel:log>"Object Code in start = ${objCode}"</gel:log>
<gel:log>"Object Id in start = ${objId}"</gel:log>
<!-- Set these for the process -->
<gel:persist var="objCode" value="${objCode}" scope="PROCESS"/>
<gel:persist var="objId" value="${objId}" scope="PROCESS"/>
V/r,
Gene (with thanks to Bob for figuring this out for us)