Update Table from Another Table Data Driven BPM

,

I’ve spent the last hour looking for a post that would help, but haven’t come up with anything. I feel like what I’m trying to do should be super-simple, but I can’t find an easy way.

I’m looking for an easy way to update a single field from Table A when it is triggered from a Data Driven BPM in Table B (If I need to use a Method Directive, I can do that too). To be more specific, when the Operation Sequence ID “10” in job “XYZ” is marked as complete in JobOper, I want to change the status of a Project Task ID “010” of Project “123” to “C” for complete.

There has to be a simple way to do this. Any help would be appreciated!

Thanks,
-Dan

Don’t have my cookbook handy, but search for transaction scope. …Reiterating others comments use custom code as the last option.

You might have been referring to a post similar to this Please Help Me :|: BPM issue

Yes in E10 (10.1?) you can do this with the Invoke BO Method Widget, but you will need to first create the DataSet Variable for the target BO. Then you can use the Update Table with Query. The Query would retreive the record you want to update per your criteria.
Then after you set the values you want in the DataSet then you call it’s BO to update the record.
That’s the basics… it can be a bit tricky the first time, but it works and it seems pretty upgrade proof.

Use the Trace Utility and mark a Task complete then you will find the Business Objects you should call to perform the action. Since it isn’t a Custom Field, id recommend using the BO, perhaps emails are triggered and other related tasks.

2 Likes

A nice little feature when adding the BO widgets (at least in 10.2.600) is you can create a variable of the correct type directly from the argument configuration screen. It helps keep you from having to search/filter through the whole list of TableSet types.

@Doneall – When you do use the BO Methods to get the data and update the correct records, be sure to set the RowMod field to “U” (or IceRow.ROWSTATE_UPDATED) or else the Update call won’t change the data. This is definitely necessary when using the .Update call, and other method calls may require it.

Ok. So here is what I have so far…

image

  1. I save the ProjectID as a variable ( _ProjectID )
  2. Get the Project by using my variable, and then returning the dataset as another variable ( _ProjectDataset )
  3. Update my dataset (This is the tricky part for me. Is the configured mapping the values that I am updating to? So like in SQL terms… Set [field] = value)
  4. Invoke the Update BO.

My Update Table settings…

How am I doing so far?

1 Like

Got it working! Thanks! I just had 1 step left to do. I missed adding the Relations at the top of the mapping window…
image

And thanks for the advice about setting the RowMod field to “U”. I definitely would have forgotten about that one.

Thanks again for all your help!

2 Likes