Call Context BPM Data - Help Needed

I have built a report from scratch using a BAQ as the rdd. I am trying to set a rule that will bomb out the report if the user enters a quantity that exceeds the completed quantity to the job operation that is being called by the report.

Is there a way for me to assign the completed quantity of the operation to callcontextbpmdata number 1?

A report is run on demand and separate from the Labor Reporting right?

So no CallContext only lives in a single Business Object at a time.

@josecgomez,

Little confused on your verbiage, but I assume that’s a no.

Yeah probably a no

CallContext only survives calls in the same business obeject instance

What do you mean by “bomb out”?

Prevent the report from printing when a user entered value on the report form exceeds a value from the BAQ result?

Yes. The idea is that we call up the completed quantity for a job using a call context or something similar, and throw an exception message that states that the report cannot run because the user is attempting to move more pieces than are available.

I guess I’m confused as how the report figures into it.

The part where you say, “…is attempting…”, is unclear. Wouldn’t they have already done the transaction before the report is run?

Or is this going to be an auto printed report that is fired when they attempted transaction is being processed? Like the pseudo code:

 If (Desired Qty to Issue > (Qty per * Qty Completed)) Then
    Print BAQ Report     // with the Desired Qty to Issue passed to the report 
    Raise Exception
Else
  go ahead and issue the material
End If

Sorry, Ill explain from the top.

I was asked to create a “Move Ticket” report that will take the users input for the following:

  1. Job number
  2. Job operation
  3. Quantity being moved

I figured the way to go would be to build a baq that fetches relevant information based on those parameters.

I am now trying to limit the chance that the users parameter values will conflict with data that is in the system.

For example: Job 100001 Op 20 has 7 of 10 pieces completed. The user accidentally fat fingers the input and presses 8 instead of 7. I want the report to show an error that states that: “The quantity entered for the move ticket exceeds the quantity of pieces completed for Job# 100001 Op 20. Please enter a valid quantity to process move ticket.”

Is there a better way to do what I’m trying to accomplish?

You want that warning message in the report?

Or as a pop-up, which prevents the “Move Ticket” from printing?

I would like a pop-up.

The fields on the form implemented as RDD Criteria? Including the “Qty to move”? Or is that as a customization of the report window?

They are RDD Criteria.

It doesn’t look like there’s a BPM that can intercept the submission of the report. But you could make a customization of the report form that has a BeforeToolbar (or something like that), that would do the check when the Print or Preview toolbar button is clicked.

Or even have the field where they enter the Qty, balk at a value over the Qty Produced. I think you could even disable the print functionality if the Qty entered was too much.

Just put parameters in your BAQ and map those parameters over to the report. That way if they enter the wrong parameters they BAQ won’t return the results.

2 Likes

If you want the report to run but with a warning about the qty’s entered, you can get those values from UserCriteria.RptParameter in your report’s datasets. It is an XML string with all the parameters. You’d have to pickout the value from the XML.

In the example below, my BAQ based RDD report has one criteria “Desc”. When I ran it, I entered%#12%, and the RptParameter string was:

image

But in order for the report to print that value can’t be used to prevent the generation of the report data.

I see how to make a Parameter in a BAQ and I see where they end up in the RDD. What I don’t see is how to assign a value to a parameter without user input.

In the current need case we want to copy over the “Quantity Complete” value from job number 100001 on op 20 and assign it to the parameter “CompQty”. How do I go about doing that?

Why wouldn’t you assign an input, you are asking the user to type the quantity. I thought the purpose was to check that the user didn’t type in the wrong amount.

In the scenario you described the user would type
Job, Opr, Qty and each of those would map over to a parameter if they type in an amount that is greater than that completed the report would not run / not return anything no?

That’s where I’m trying to get to. The system knows how many pieces are complete on the job and op but the user may not. How do I compare against Quantity complete without having the user enter that quantity?

Why would you compare? I thought the goal was so that the user wouldn’t generate a report with the wrong quantity on it.

so if they user types 100 and there’s only 52 the BAQ won’t return results and the report won’t print. If you are looking to stop the user from doing the wrong quantity to begin with, then I would stay away from the report all together and use a customization to check the values against the database record and then stop the report from running at all.

Your best bet there is to use something like BOReader or a BAQDataView to extract or subscribe to the Job / Oper Filters and then bring back the value. Then use a BeforeTool Click event to compare the two.

1 Like

@josecgomez,

Any chance you have a cheat sheet on setting these up?