How to pass variable value into Landmark transaction

 5 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Taras
Basic Member Send Private Message
Posts: 4
Basic Member
I need to find specific record in PfiWorkunitVariable table. In order to do this I try to use Landmark transaction with following parameters:

_dataArea="lmstglpa" & _module="pfi" & _objectName="PfiWorkunitVariable" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _pageSize="30" & _filterString="VariableValue = \"0010003781\"" & UniqueID

With hard-coded value it works well but as soon as i tried to use variable it stop working. Variable is like '<'!vOrderExists'>' - without quotes, because site do not accept everything inside  '<'! and '>'
This is example how it looks with variable and error I receive:
_dataArea="lmstglpa" & _module="pfi" & _objectName="PfiWorkunitVariable" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _pageSize="30" & _filterString="VariableValue = \"vOrderExists<!--vOrderExists-->\"" & UniqueID

  Variables in Process:
vTest =
vOrderExists = 10003781

Activity completed: Start

Activity started: LMTxn5190  (Run Id: 18)
Landmark:LMTxn5190 Executing transaction_dataArea="lmstglpa" & _module="pfi" & _objectName="PfiWorkunitVariable" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _pageSize="30" & _filterString="VariableValue = \"vOrderExists"" & UniqueID
Landmark:LMTxn5190 Executing transaction_dataArea="lmstglpa" & _module="pfi" & _objectName="PfiWorkunitVariable" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _pageSize="30" & _filterString="VariableValue = \"10003781\"" & UniqueID
Landmark:LMTxn5190 Activity Error org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
    at com.lawson.bpm.landmark.HttpLandmarkAdapter.executeCall(HttpLandmarkAdapter.java:857)
    at com.lawson.bpm.landmark.HttpLandmarkAdapter.processMultiple(HttpLandmarkAdapter.java:828)
    at com.lawson.bpm.landmark.HttpLandmarkAdapter.execute(HttpLandmarkAdapter.java:331)
    at com.lawson.bpm.processflow.workFlow.flowGraph.FgaLandmark.startActivity(FgaLandmark.java:313)
    at com.lawson.bpm.processflow.workFlow.flowGraph.FgActivity.execute(FgActivity.java:742)
    at com.lawson.bpm.processflow.workFlow.flowGraph.FgProcess.run(FgProcess.java:2178)
    at com.lawson.bpm.designer.runtime.LocalFlowRunner.run(Unknown Source)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Variables in Process:
lastReturnMessage = org.xml.sax.SAXParseException: Content is not allowed in prolog.
lastErrorCode = 17
lastOutputData =
lastInformationCode = 0

LMTxn5190_errorCode = 17
LMTxn5190_informationCode = 0
LMTxn5190_returnMessage = org.xml.sax.SAXParseException: Content is not allowed in prolog.
LMTxn5190_outputData =
LMTxn5190_recordCount = 0
LMTxn5190_complete = false
LMTxn5190_hasNext = false
LMTxn5190_hasPrevious = false
Activity failed: LMTxn5190
Terminating the process ...

Activity started: End  (Run Id: 19)
Activity End: Executing End activity
Activity completed: End
Process completed - 02/17/2014 16:20:30

Process ended with error code (17) - Landmark Activity Error
Information code: 0
Return message: org.xml.sax.SAXParseException: Content is not allowed in prolog.
Output data: (null)
Error occurred in activity: LMTxn5190

Any idea what I'm doing wrong?
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Hi Taras - I was able to make this work correctly in LMRK v9.2.5 using the variable in the filter using the standard variable naming, but they key is that I had to also include the PfiWorkunit and PfiWorkunitVariable fields in the output - without those, it doesn't work correctly.  I'm not sure why IPA requires this, but it does. 

Attached is a screenshot of my landmark node that worked correctly:



By the way, filtering can be VERY SLOW.  If you can limit by the PfiWorkunit and PfiWorkunitVariable in the query you will be better off.  However, that may not be possible in this case. 

Be cautious, however, because they way your query is currently written, there is no way to confirm that the record you are getting in return is what you are really looking for - it could be from any workunit and any variable name that happens to have a value of "10003781".

Good Luck!   Kelly
Kelly Meade
J. R. Simplot Company
Boise, ID
Taras
Basic Member Send Private Message
Posts: 4
Basic Member
Hi,
First of all many thanks for your help.

I tried to use your example but problem still exist.
This is example from my Landmark Transaction node

In attached file I added execution log.

Situation is following. When I use hardcoded value in filter everything works perfect, but as soon as I tried to use variable i receive error  "Content is not allowed in prolog"
Attachments
Demi
Veteran Member Send Private Message
Posts: 67
Veteran Member
You have too many quotes around your filterString parameter.
Taras
Basic Member Send Private Message
Posts: 4
Basic Member
Even without quotes, around filter String parameter, result is the same.
Will need to open Infor ticket.
Taras
Basic Member Send Private Message
Posts: 4
Basic Member
Found the reason of situation described above.
Lawson consultants installed different versions of Rich Cliend (10.0.3.11.5675) and Process Designer (10.0.3.0.5533) which cause such issue. After versions synchronized all issues gone.