Passing Data from One Directive to Another?

I am trying to figure out if it is possible to capture and pass data on one method directive to another method directive. I will do my best to explain what I am trying to do and what is prompting this question. If I am totally off base and someone has another solution, please let me know.

I am attempting to use BPM Holds as a way to have a workflow for master data record creation. Let’s use Customer for our example. When a new Customer is created, I have set up a BPM to apply to BPM holds on that record, hold1 and hold2. The intent of these are to restrict other transactions from happening until the record has been completely set-up. So, once group1 finishes what they are responsible for on the record, they would remove hold1 and an email would be sent to group2 for them to do what they are responsible for and then remove hold2. Now the record is fully set up and there would not be any more holds.

The problem I am running into is trying to restrict who can remove these holds and when they can be removed. I have set up Security Groups for each hold type and assigned them to the appropriate users. On delete of a BPM Hold, I am trying to check who is calling the method and what holds are still active on the record. I performed a trace on a delete of a BPM Hold and for BpHoldsImpl the methods were GetRows and Update. Looking at the datasets in the methods, the hold that is being deleted only appears in the GetRows method and not the Update method.

I had assumed I would want to put the directive on Pre-Processing Update. But without the record I am deleting, I’m completely lost on how to set up any restrictions. I don’t think I can use the GetRows method as that is just getting the data to display in the form.

Any help would be appreciated.

Hello John,

Just curious, why not craft your BPM to check for all of the conditions required and add the hold if something is missing or is incorrect? If everything is correct, have the BPM remove the hold (if it exists). If these must be done sequentially, then add the group 2 hold once the group 1 requirements are fulfilled. If they can be done in parallel, then just have two conditions with each removing the hold when everything is correct.

Great application of BPM Holds!

Mark W.

1 Like

The hold is not tied to specific requirements. We want to set up the customer at quotation, and we all know how poor the customer data is at that point. So, once the customer is created for the quote, it is up to inside sales to update the information from the customer PO (if we get one). We also require a credit check be done and other stuff. We want to stop any orders being entered until we know the data is good. So, it is more data integrity than required conditions.

Don’t know why I did not think of this, excellent idea. But I think I run into the same issue. In the Update Pre-Processing ds, the row being deleted is not identified, so I can’t say if hold1 is being deleted, create and attach hold2? (I think)

Thank you!

I have been picking apart the trace log and think I have figured out what I need to do. The ds contains all holds that are still on the record. I am thinking I almost need to do this in reverse and say “if hold2 exists, then you must be deleting hold1 and you can if you belong to this security group”. And to make sure it goes in order, “if hold1 exists, you must be trying to delete hold2 and can’t because hold1 is still there”.

I’m currently trying to map it out and do it. I will post my results!