Service Connect Conditional Functoid


(Aaron Willett) #1

I’m a bit lost on how to use this functoid properly.
I’m doing DBLookup that returns the max RMAReceipt.
I’d like the condition to be if the value returned from the DBLookup is null, then 1, else DBValue + 1.
I have the result of the DB going into the alternate path, but I’m not sure how to set it up from there.
It also looks like the values I have available are from the original schema instead of what the DB is returning.
Anyone have some examples on this?



(Jose C Gomez) #2

You have to do the lookup inside the condition. (Not sure if the DB Lookup is available in there… )if it is not, you’ll have to do 2 conversions , one lookup value and map it to workflow variable, 2nd conversion use the workflow variable to apply the condition.


(Aaron Willett) #3

And would this be how to check if null, or do I leave it blank?


(Jose C Gomez) #4

Blank would likely be better. Not sure it knows what “Null” is (I can’t recall)


(Aaron Willett) #5

So, I’m getting an abortive error on the first conversion where I’m doing the DBLookup and assigning it to the process variable. It’s saying:

<Descr>Function 'dbLookup' did not return a value, or it returned a value that cannot be converted to an XSL data type.
</Descr>

(Aaron Willett) #6

Ah, I got it.
I changed my select statement to this: CASE WHEN COUNT([RMAReceipt]) > 0 THEN COUNT([RMAReceipt]) ELSE 0 END


(Aaron Willett) #7

Why is it that when I follow the trace log: GetNewRMARctp, PreUpdate, UpdateExt, I get two lines created, but if I just do UpdateExt, it properly adds just the one? Is UpdateExt doing something that a regular Update does not?


(Jose C Gomez) #8

Yes UpdateExt bypasses a LOT of the standard logic. Just yesterday I was able to release a job without it being engineered (by accident) using UpdateExt


(Aaron Willett) #9

Is it better practice to follow the trace log and use Update at the end, or am I required to use UpdateExt when coming from SC?


(Jose C Gomez) #10

Following standard logic is always best practice


(Aaron Willett) #11

When would you use UpdateExt over Update?
Is that more for external DLL stuff?


(Jose C Gomez) #12

Ostensibly you should be able to use either or… however there is a lot of logic “missed” in UpdateExt with my experience. UpdateExt is also faster… You should also be able to use UpdateExt to create completely new items (Sales Order) without calling any of the intermediate Methods… but again you get what you pay for.


(Aaron Willett) #13

How about this?
I loops through 90% of them just fine, but on a few it throws an error saying that the bin is invalid. I’m setting the same warehouse and bin on every record.


(Jose C Gomez) #14

You doing a subworkflow (one record at a time loop) or trying to run it all in parallel?


(Aaron Willett) #15

SubWorkFlow run synchronously.


(Jose C Gomez) #16

What does the workflow trace show? (Error wise)


(Aaron Willett) #17

Actually, it appears to not be taking the bin at all, so I guess the error makes sense if it doesn’t exist in the remote warehouse. They should all be RCV…


(Aaron Willett) #18

Is there something I’m missing as far as setting the warehouse and bin?
I set the following fields on the RMARcpt table:
BinNum
BinNumDescription
EnableBin
WarehouseCode
WarehouseCodeDescription
EnableWarehouse

I’ve tried every combination of those fields with no success.


(Jose C Gomez) #19

In the trace is there a call to ChangeWhse, ChangeBin by chance?


(Aaron Willett) #20

Negative. Just the three:

<tracePacket>
  <businessObject>Erp.Proxy.BO.RMAProcImpl</businessObject>
  <methodName>GetNewRMARcpt</methodName>
  <appServerUri>net.tcp://isiepicor/PILOT/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>3/1/2018 13:09:13:2463459 PM</localTime>
  <executionTime total="68" roundTrip="42" channel="14" bpm="0" other="12" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.RMAProcDataSet">
      <RMAProcDataSet xmlns="http://www.epicor.com/Ice/300/BO/RMAProc/RMAProc" />
    </parameter>
    <parameter name="rmANum" type="System.Int32"><![CDATA[10271]]></parameter>
    <parameter name="rmALine" type="System.Int32"><![CDATA[1]]></parameter>
  </parameters>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.RMAProcImpl</businessObject>
  <methodName>PreUpdate</methodName>
  <appServerUri>net.tcp://isiepicor/PILOT/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>3/1/2018 13:09:15:5787097 PM</localTime>
  <executionTime total="198" roundTrip="166" channel="0" bpm="1" other="31" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.RMAProcDataSet">
      <RMAProcDataSet xmlns="http://www.epicor.com/Ice/300/BO/RMAProc/RMAProc" />
    </parameter>
    <parameter name="RequiresUserInput" type="System.Boolean"><![CDATA[False]]></parameter>
  </parameters>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.RMAProcImpl</businessObject>
  <methodName>Update</methodName>
  <appServerUri>net.tcp://isiepicor/PILOT/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>3/1/2018 13:09:15:7892326 PM</localTime>
  <executionTime total="2623" roundTrip="2606" channel="0" bpm="0" other="17" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.RMAProcDataSet">
      <RMAProcDataSet xmlns="http://www.epicor.com/Ice/300/BO/RMAProc/RMAProc" />
    </parameter>
  </parameters>
</tracePacket>