Process Variable not getting assigned with DSE

I have a rule to fetch DSE from database. Debugged and works fine.

In my process model, I'm using pkId to lookup data using my rule and then assigning it to a process variable. Unfortunately my process variable is not getting assigned. When I debug the process, I don't see any errors and I've double checked my rule for fetching data and that I'm passing id correctly.

On the Data Output tab of my script task I'm calling the rule - rule!GetDataById(pv!myId) with a Custom Output. myId is populated with value e.g. 4, and I see it when I debug

I'm storing the results in process variable for my entity. However, after I let the script task finish and check my process variables, my entity object is empty.

This should just work :-( 

What obvious thing could I be missing?

  Discussion posts and replies are publicly visible

Parents
  • Okay so I figured out my problem. I don't think the instructions in the tutorial are clear.

    When I have a Query Expression Rule, what I get back is an object of type DataSubset.

    When I'm asking Script Task Custom Output to save the results to my CDT, it does not work. My first question is why is Appian not throwing an error when I'm trying to assign a 'DataSubset' to a 'Vehicle'? Pressing question is how do I extract the 1 Vehicle instance in my Dataset?

    What I did was typename(typeof(rule!VFM_getVehicleById(pv!vehicleId))) to realize I"m getting a Dataset back and not a Vehicle. I was blindly following screenshot in the tutorial to my detriment.

    So right now I'm trying to assign the results of expression rule!VFM_getVehicleById(pv!vehicleId) to pv!vehicle. I need to modify the expression to yield the embedded CDT. Can anyone help?

Reply
  • Okay so I figured out my problem. I don't think the instructions in the tutorial are clear.

    When I have a Query Expression Rule, what I get back is an object of type DataSubset.

    When I'm asking Script Task Custom Output to save the results to my CDT, it does not work. My first question is why is Appian not throwing an error when I'm trying to assign a 'DataSubset' to a 'Vehicle'? Pressing question is how do I extract the 1 Vehicle instance in my Dataset?

    What I did was typename(typeof(rule!VFM_getVehicleById(pv!vehicleId))) to realize I"m getting a Dataset back and not a Vehicle. I was blindly following screenshot in the tutorial to my detriment.

    So right now I'm trying to assign the results of expression rule!VFM_getVehicleById(pv!vehicleId) to pv!vehicle. I need to modify the expression to yield the embedded CDT. Can anyone help?

Children