How to set ttCallContextBpmData.Checkbox01

Thanks, I ended up service connect because it was easier and I could actually get it to work. It seemed like MoveJobItem wasn't working even though I was getting no errors.



From: Stephen Edginton <stephene@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Wednesday, September 25, 2013 10:08 AM
Subject: RE: [Vantage] How to set ttCallContextBpmData.Checkbox01



Hi
 
The easiest way is
RUN server\bo\ScheduleEngine\ScheduleEngine.p PERSISTENT SET hScheduleEngine.
 
I would however be careful with this type of rescheduling triggered off a data directive, global scheduling is the normal route to take.
 
Thanks,
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tkoch77@...
Sent: 25 September 2013 14:59
To: vantage@yahoogroups.com
Subject: [Vantage] How to set ttCallContextBpmData.Checkbox01
 
 
I have an issue where I need to set ttCallContextBpmData.Checkbox01 for use in a pre-processing directive on ScheduleEngine.MoveJobItem.

I currently have a pre-processing BPM on MoveJobItem that pops up a BPM data form that asks to schedule all lower level jobs.

I have created a data directive on JobOper that will automatically reschedule that job with a .p file.

The problem is, when the .p triggers MoveJobItem it also triggers my other BPM to show the form which I don't want. I am trying to set ttCallContextBpmData.CheckBox01 before I call MoveJobItem in the .p file, but not having any luck.

Anyone have any ideas how to accomplish this?

Here is the .p

{Bpm/Bpm.i &OBJECT_NAME="ScheduleEngine"}
{Bpm/MiscCallContext.i}
{bo/ScheduleEngine/ScheduleEngine_ds.i}

define input parameter iCompany as character.
define input parameter iJobNum as character.
define input parameter iReqDate as date.

{&TRY_PRIVATE}

    DEFINE VARIABLE morePages AS LOGICAL.
    DEFINE VARIABLE hScheduleEngine AS HANDLE.
    DEFINE VARIABLE iFinished AS LOGICAL.
    DEFINE VARIABLE iWarn AS CHARACTER.

    RUN bo\ScheduleEngine\ScheduleEngine.p PERSISTENT SET hScheduleEngine.
   
    IF VALID-HANDLE (hScheduleEngine) THEN
    DO:
               
               
            RUN GetScheduleRecord IN hScheduleEngine ( {&input-output_dataset_ScheduleEngineDataSet}).
           
            FOR EACH ttScheduleEngine WHERE ttScheduleEngine.RowMod = 'A'.
                ASSIGN ttScheduleEngine.Company = iCompany.
                ASSIGN ttScheduleEngine.JobNum = iJobNum.
                ASSIGN ttScheduleEngine.AssemblySeq = 0.
                ASSIGN ttScheduleEngine.OprSeq = 0.
                ASSIGN ttScheduleEngine.OpDtlSeq = 0.
                ASSIGN ttScheduleEngine.StartTime = 0.
                ASSIGN ttScheduleEngine.EndDate = iReqDate.
                ASSIGN ttScheduleEngine.EndTime = 0.
                ASSIGN ttScheduleEngine.WhatIf = false.
                ASSIGN ttScheduleEngine.Finite = false.
                ASSIGN ttScheduleEngine.SchedTypeCode = 'ja'.
                ASSIGN ttScheduleEngine.ScheduleDirection = 'End'.
                ASSIGN ttScheduleEngine.SetupComplete = false.
                ASSIGN ttScheduleEngine.ProductionComplete = false.
                ASSIGN ttScheduleEngine.OverrideMtlCon = true.
                ASSIGN ttScheduleEngine.RecalcExpProdYld = false.
                ASSIGN ttCallContextBpmData.CheckBox01 = true.
            END.
           
            RUN MoveJobItem IN hScheduleEngine ( {&input_dataset_ScheduleEngineDataSet}, output iFinished, output iWarn).
           
    END.
    ELSE
    DO:
        message "Could not create handle to hScheduleEngine.p!".
    END.
   
DELETE OBJECT hScheduleEngine.

{&CATCH_PRIVATE}

Thanks,

-Ted




I have an issue where I need to set ttCallContextBpmData.Checkbox01 for use in a pre-processing directive on ScheduleEngine.MoveJobItem.

I currently have a pre-processing BPM on MoveJobItem that pops up a BPM data form that asks to schedule all lower level jobs.

I have created a data directive on JobOper that will automatically reschedule that job with a .p file.

The problem is, when the .p triggers MoveJobItem it also triggers my other BPM to show the form which I don't want. I am trying to set ttCallContextBpmData.CheckBox01 before I call MoveJobItem in the .p file, but not having any luck.

Anyone have any ideas how to accomplish this?

Here is the .p

{Bpm/Bpm.i &OBJECT_NAME="ScheduleEngine"}
{Bpm/MiscCallContext.i}
{bo/ScheduleEngine/ScheduleEngine_ds.i}

define input parameter iCompany as character.
define input parameter iJobNum as character.
define input parameter iReqDate as date.

{&TRY_PRIVATE}

    DEFINE VARIABLE morePages AS LOGICAL.
    DEFINE VARIABLE hScheduleEngine AS HANDLE.
    DEFINE VARIABLE iFinished AS LOGICAL.
    DEFINE VARIABLE iWarn AS CHARACTER.

    RUN bo\ScheduleEngine\ScheduleEngine.p PERSISTENT SET hScheduleEngine.
   
    IF VALID-HANDLE (hScheduleEngine) THEN
    DO:
               
               
            RUN GetScheduleRecord IN hScheduleEngine ( {&input-output_dataset_ScheduleEngineDataSet}).
           
            FOR EACH ttScheduleEngine WHERE ttScheduleEngine.RowMod = 'A'.
                ASSIGN ttScheduleEngine.Company = iCompany.
                ASSIGN ttScheduleEngine.JobNum = iJobNum.
                ASSIGN ttScheduleEngine.AssemblySeq = 0.
                ASSIGN ttScheduleEngine.OprSeq = 0.
                ASSIGN ttScheduleEngine.OpDtlSeq = 0.
                ASSIGN ttScheduleEngine.StartTime = 0.
                ASSIGN ttScheduleEngine.EndDate = iReqDate.
                ASSIGN ttScheduleEngine.EndTime = 0.
                ASSIGN ttScheduleEngine.WhatIf = false.
                ASSIGN ttScheduleEngine.Finite = false.
                ASSIGN ttScheduleEngine.SchedTypeCode = 'ja'.
                ASSIGN ttScheduleEngine.ScheduleDirection = 'End'.
                ASSIGN ttScheduleEngine.SetupComplete = false.
                ASSIGN ttScheduleEngine.ProductionComplete = false.
                ASSIGN ttScheduleEngine.OverrideMtlCon = true.
                ASSIGN ttScheduleEngine.RecalcExpProdYld = false.
                ASSIGN ttCallContextBpmData.CheckBox01 = true.
            END.
           
            RUN MoveJobItem IN hScheduleEngine ( {&input_dataset_ScheduleEngineDataSet}, output iFinished, output iWarn).
           
    END.
    ELSE
    DO:
        message "Could not create handle to hScheduleEngine.p!".
    END.
   
DELETE OBJECT hScheduleEngine.

{&CATCH_PRIVATE}

Thanks,

-Ted

Hi

 

The easiest way is

RUN server\bo\ScheduleEngine\ScheduleEngine.p PERSISTENT SET hScheduleEngine.

 

I would however be careful with this type of rescheduling triggered off a data directive, global scheduling is the normal route to take.

 

Thanks,

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tkoch77@...
Sent: 25 September 2013 14:59
To: vantage@yahoogroups.com
Subject: [Vantage] How to set ttCallContextBpmData.Checkbox01

 

 

I have an issue where I need to set ttCallContextBpmData.Checkbox01 for use in a pre-processing directive on ScheduleEngine.MoveJobItem.

I currently have a pre-processing BPM on MoveJobItem that pops up a BPM data form that asks to schedule all lower level jobs.

I have created a data directive on JobOper that will automatically reschedule that job with a .p file.

The problem is, when the .p triggers MoveJobItem it also triggers my other BPM to show the form which I don't want. I am trying to set ttCallContextBpmData.CheckBox01 before I call MoveJobItem in the .p file, but not having any luck.

Anyone have any ideas how to accomplish this?

Here is the .p

{Bpm/Bpm.i &OBJECT_NAME="ScheduleEngine"}
{Bpm/MiscCallContext.i}
{bo/ScheduleEngine/ScheduleEngine_ds.i}

define input parameter iCompany as character.
define input parameter iJobNum as character.
define input parameter iReqDate as date.

{&TRY_PRIVATE}

    DEFINE VARIABLE morePages AS LOGICAL.
    DEFINE VARIABLE hScheduleEngine AS HANDLE.
    DEFINE VARIABLE iFinished AS LOGICAL.
    DEFINE VARIABLE iWarn AS CHARACTER.

    RUN bo\ScheduleEngine\ScheduleEngine.p PERSISTENT SET hScheduleEngine.
   
    IF VALID-HANDLE (hScheduleEngine) THEN
    DO:
               
               
            RUN GetScheduleRecord IN hScheduleEngine ( {&input-output_dataset_ScheduleEngineDataSet}).
           
            FOR EACH ttScheduleEngine WHERE ttScheduleEngine.RowMod = 'A'.
                ASSIGN ttScheduleEngine.Company = iCompany.
                ASSIGN ttScheduleEngine.JobNum = iJobNum.
                ASSIGN ttScheduleEngine.AssemblySeq = 0.
                ASSIGN ttScheduleEngine.OprSeq = 0.
                ASSIGN ttScheduleEngine.OpDtlSeq = 0.
                ASSIGN ttScheduleEngine.StartTime = 0.
                ASSIGN ttScheduleEngine.EndDate = iReqDate.
                ASSIGN ttScheduleEngine.EndTime = 0.
                ASSIGN ttScheduleEngine.WhatIf = false.
                ASSIGN ttScheduleEngine.Finite = false.
                ASSIGN ttScheduleEngine.SchedTypeCode = 'ja'.
                ASSIGN ttScheduleEngine.ScheduleDirection = 'End'.
                ASSIGN ttScheduleEngine.SetupComplete = false.
                ASSIGN ttScheduleEngine.ProductionComplete = false.
                ASSIGN ttScheduleEngine.OverrideMtlCon = true.
                ASSIGN ttScheduleEngine.RecalcExpProdYld = false.
                ASSIGN ttCallContextBpmData.CheckBox01 = true.
            END.
           
            RUN MoveJobItem IN hScheduleEngine ( {&input_dataset_ScheduleEngineDataSet}, output iFinished, output iWarn).
           
    END.
    ELSE
    DO:
        message "Could not create handle to hScheduleEngine.p!".
    END.
   
DELETE OBJECT hScheduleEngine.

{&CATCH_PRIVATE}

Thanks,

-Ted