


In a workflow that contains existing query and filters, how do I use SOAP to update said filters? I've tried different things but I can't update a filter. Any help/instructions would be much appreciated.
My XML looks like this so far:
<?xml version='1.0' encoding='ISO-8859-1'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:session">
<soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"></soap:Header>
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<urn:WriteCollection>
<urn:sessiontoken>{{sessiontoken}}</urn:sessiontoken>
<urn:domDoc>
<recipient-collection xtkschema="nms:recipient">
<recipient-collection>
</workflow-collection>
</urn:domDoc>
</urn:WriteCollection>
</soapenv:Body>
</soapenv:Envelope>
This is the block in the workflow I'd like to update:
<query collision="0" distinct="true" img="nms:activities/query.png" keepAllExtraData="false"
label="unique Key starts with 'some_value' and email of recipient contains 'perry' and cell Code equal to 'D01O'"
mask="0" name="query" noAutoPk="false" noAutoPkFilter="false" onError="0"
recipientLink="" runOnSimulation="true" schema="bell:campaignHistory"
timezone="_inherit_" useSource="0" x="304" y="168">
<transitions>
<result enabled="true" label="Result" name="result" target="enrich"/>
</transitions>
<select>
<node analyze="false" expr="@campaignCode" label="Campaign Code"/>
...(bunch of nodes)
<node analyze="false" expr="@uniqueKey" label="Unique Key"/>
</select>
<where displayFilter="somedisplayfilter"
filterName="somefiltername" id="3918004415">
<condition boolOperator="AND" compositeKey="" dependkey="" enabledIf=""
expr="@uniqueKey LIKE 'some_value' + '%'" internalId="2538144714"/>
<condition boolOperator="AND" compositeKey="" dependkey="" enabledIf=""
expr="[recipient/@email] LIKE '%' + 'perry' + '%'" internalId="2538144715"/>
<condition compositeKey="" dependkey="" enabledIf="" expr="@cellCode = 'D01O'"
internalId="2538144716"/>
</where>
<humanCond>Query: unique Key starts with 'some_value' and email of recipient contains 'perry' and cell Code equal to 'D01O'</humanCond>
</query>
Views
Replies
Sign in to like this content
Total Likes
Hi,
Use SOAPAction: xtk:persist#Write
<?xml version='1.0'?>
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:ns='urn:xtk:persist'
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<Write xmlns='urn:xtk:persist' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<__sessiontoken xsi:type='xsd:string'></__sessiontoken>
<domDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
<workflow _operation="update" id="8620" xtkschema="xtk:workflow">
<activities>
<query _operation="update" label="1 equal to 1" name="query">
<where _operation="delete" id="3450798105"/>
<where _operation="insert" displayFilter="1 equal to 1" filterName="backGroundFilterFrm" id="3455451164">
<condition compositeKey="" dependkey="" enabledIf="" expr="1 = 1" internalId="3455254554"/>
</where>
<humanCond>Query: 1 equal to 1</humanCond>
</query>
</activities>
</workflow>
</domDoc>
</Write>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks,
-Jon
Hi @perry_liu ,
Yes, you can do it as below
<urn:strWorkflowId>WKF**</urn:strWorkflowId>
<urn:strActivity>signal</urn:strActivity>
<urn:strActivity>query</urn:strActivity>
<urn:strTransition></urn:strTransition>
<urn:elemParameters>
<!--You may enter ANY elements at this point-->
</urn:elemParameters>
Views
Replies
Sign in to like this content
Total Likes
Is the content within elemParameters like this:
<elemParameters>
<variables>
<sysFilter>
<condition boolOperator="AND" expr="@uniqueKey LIKE 'SOMETHING_000' + '%'"/>
<condition boolOperator="AND" expr="[recipient/@email] LIKE '%' + 'perry' + '%'" />
<condition compositeKey="" dependkey="" enabledIf="" expr="@cellCode = 'TE3Q'"/>
</sysFilter>
</variables>
</elemParameters>
Views
Replies
Sign in to like this content
Total Likes
Another I tried is but it doesn't seem to work:
<strTransition>query</strTransition>
<elemParameters>
<variables>
<sysFilter>
<condition boolOperator="AND" expr="@uniqueKey LIKE 'SOME_VALUE' + '%'"/>
<condition boolOperator="AND" expr="[recipient/@email] LIKE '%' + 'perry' + '%'" />
<condition expr="@cellCode = 'TE3Q'"/>
</sysFilter>
</variables>
</elemParameters>
<bComplete>1</bComplete>
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
With the answer above it doesn't give me a clear answer as to how to modify the filter in the query.
I still don't know what to place within the <urn:elemParameters> to update the filter in the query. I can add variables and utilize it to update the filter but how do I use this to add or remove filters from the query, or even all the filters directly?
Views
Replies
Sign in to like this content
Total Likes
Hi,
Use SOAPAction: xtk:persist#Write
<?xml version='1.0'?>
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:ns='urn:xtk:persist'
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<Write xmlns='urn:xtk:persist' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<__sessiontoken xsi:type='xsd:string'></__sessiontoken>
<domDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
<workflow _operation="update" id="8620" xtkschema="xtk:workflow">
<activities>
<query _operation="update" label="1 equal to 1" name="query">
<where _operation="delete" id="3450798105"/>
<where _operation="insert" displayFilter="1 equal to 1" filterName="backGroundFilterFrm" id="3455451164">
<condition compositeKey="" dependkey="" enabledIf="" expr="1 = 1" internalId="3455254554"/>
</where>
<humanCond>Query: 1 equal to 1</humanCond>
</query>
</activities>
</workflow>
</domDoc>
</Write>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks,
-Jon