Prevent closing a job - BPM help - Bayesian Filter detected spam

That's what I thought too Ken, and I had some spare time last night.



Rob Bucek

Manufacturing Engineer

PH: (715) 284-5376 ext 3111

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Ken Williams
Sent: Thursday, May 27, 2010 9:55 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Prevent closing a job - BPM help - Bayesian
Filter detected spam





Rob thanks for this code. I was going to start working on it today if no
one had replied, as Jen's suggestion is a GREAT one - so you just saved
me an hour or 3 :).

Ken

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of jendmp
Sent: Thursday, May 27, 2010 7:28 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Prevent closing a job - BPM help - Bayesian
Filter detected spam

Rob, you are the BPM master! Thanks!

Jen

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>, "Rob Bucek" <rbucek@...> wrote:
>
> Try this...
>
>
>
> Method: Jobclosing.closejob
>
> PreProcess
>
> No condition
>
> Action: execute 4gl code
>
>
>
> /* Close Job Conditions */
>
>
>
> for each ttJobClosing where ttJobClosing.RowMod = 'U' or
> ttJobClosing.RowMod = 'A' and ttJobClosing.JobClosed = True no-lock.
>
> Find first PORel where ttJobClosing.Company = PORel.Company and
> ttJobClosing.JobNum = PORel.JobNum and PORel.OpenRelease = True
no-lock
> no-error.
>
> If not available PORel Then Do:
>
> Find first LaborDtl where ttJobClosing.Company = LaborDtl.Company and
> ttJobClosing.JobNum = LaborDtl.JobNum and LaborDtl.ActiveTrans = True
> no-lock no-error.
>
> If not available LaborDtl Then Do:
>
> assign ttJobClosing.JobClosed = True.
>
> assign ttJobClosing.ClosedDate = Today.
>
> End.
>
> Else Do:
>
> Define Variable xyz as Integer.
>
> xyz = LaborDtl.AssemblySeq.
>
> Define Variable abc as Integer.
>
> abc = LaborDtl.OprSeq.
>
> {lib/PublishEx.i &ExMsg = "'Assembly ' + string(xyz) + ', Operation
> Sequence ' + string(abc) + ' is still an active labor transaction.'"}.
>
> End.
>
> End.
>
> Else Do:
>
> Define Variable xxx as Integer.
>
> xxx = PoRel.PONum.
>
> {lib/PublishEx.i &ExMsg = "'Purchase Order Number ' + string(xxx) + '
> tied to this job still has open releases.'"}.
>
> End.
>
> End.
>
>
>
>
>
> Rob Bucek
>
> Manufacturing Engineer
>
> PH: (715) 284-5376 ext 3111
>
> Mobile: (715)896-0590
>
> FAX: (715)284-4084
>
> <http://www.dsmfg.com/>
>
> (Click the logo to view our site) <http://www.dsmfg.com/>
>
>
>
>
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com
<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>]
On Behalf
> Of jendmp
> Sent: Wednesday, May 26, 2010 5:06 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Prevent closing a job - BPM help
>
>
>
>
>
> Can someone help me with a BPM? I've been messing with this thing on
and
> off for months but can't figure it out.
>
> I need to prevent a job from being closed if a. Open PO's exist or b.
> there is active labor (someone is clocked into the job).
>
> Anyone out there create something like this already?
>
> Jennifer Mesiano
> Walton Signage
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Can someone help me with a BPM? I've been messing with this thing on and off for months but can't figure it out.

I need to prevent a job from being closed if a. Open PO's exist or b. there is active labor (someone is clocked into the job).

Anyone out there create something like this already?

Jennifer Mesiano
Walton Signage
Try this...



Method: Jobclosing.closejob

PreProcess

No condition

Action: execute 4gl code



/* Close Job Conditions */



for each ttJobClosing where ttJobClosing.RowMod = 'U' or
ttJobClosing.RowMod = 'A' and ttJobClosing.JobClosed = True no-lock.

Find first PORel where ttJobClosing.Company = PORel.Company and
ttJobClosing.JobNum = PORel.JobNum and PORel.OpenRelease = True no-lock
no-error.

If not available PORel Then Do:

Find first LaborDtl where ttJobClosing.Company = LaborDtl.Company and
ttJobClosing.JobNum = LaborDtl.JobNum and LaborDtl.ActiveTrans = True
no-lock no-error.

If not available LaborDtl Then Do:

assign ttJobClosing.JobClosed = True.

assign ttJobClosing.ClosedDate = Today.

End.

Else Do:

Define Variable xyz as Integer.

xyz = LaborDtl.AssemblySeq.

Define Variable abc as Integer.

abc = LaborDtl.OprSeq.

{lib/PublishEx.i &ExMsg = "'Assembly ' + string(xyz) + ', Operation
Sequence ' + string(abc) + ' is still an active labor transaction.'"}.

End.

End.

Else Do:

Define Variable xxx as Integer.

xxx = PoRel.PONum.

{lib/PublishEx.i &ExMsg = "'Purchase Order Number ' + string(xxx) + '
tied to this job still has open releases.'"}.

End.

End.





Rob Bucek

Manufacturing Engineer

PH: (715) 284-5376 ext 3111

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of jendmp
Sent: Wednesday, May 26, 2010 5:06 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Prevent closing a job - BPM help





Can someone help me with a BPM? I've been messing with this thing on and
off for months but can't figure it out.

I need to prevent a job from being closed if a. Open PO's exist or b.
there is active labor (someone is clocked into the job).

Anyone out there create something like this already?

Jennifer Mesiano
Walton Signage





[Non-text portions of this message have been removed]
Rob, you are the BPM master! Thanks!

Jen

--- In vantage@yahoogroups.com, "Rob Bucek" <rbucek@...> wrote:
>
> Try this...
>
>
>
> Method: Jobclosing.closejob
>
> PreProcess
>
> No condition
>
> Action: execute 4gl code
>
>
>
> /* Close Job Conditions */
>
>
>
> for each ttJobClosing where ttJobClosing.RowMod = 'U' or
> ttJobClosing.RowMod = 'A' and ttJobClosing.JobClosed = True no-lock.
>
> Find first PORel where ttJobClosing.Company = PORel.Company and
> ttJobClosing.JobNum = PORel.JobNum and PORel.OpenRelease = True no-lock
> no-error.
>
> If not available PORel Then Do:
>
> Find first LaborDtl where ttJobClosing.Company = LaborDtl.Company and
> ttJobClosing.JobNum = LaborDtl.JobNum and LaborDtl.ActiveTrans = True
> no-lock no-error.
>
> If not available LaborDtl Then Do:
>
> assign ttJobClosing.JobClosed = True.
>
> assign ttJobClosing.ClosedDate = Today.
>
> End.
>
> Else Do:
>
> Define Variable xyz as Integer.
>
> xyz = LaborDtl.AssemblySeq.
>
> Define Variable abc as Integer.
>
> abc = LaborDtl.OprSeq.
>
> {lib/PublishEx.i &ExMsg = "'Assembly ' + string(xyz) + ', Operation
> Sequence ' + string(abc) + ' is still an active labor transaction.'"}.
>
> End.
>
> End.
>
> Else Do:
>
> Define Variable xxx as Integer.
>
> xxx = PoRel.PONum.
>
> {lib/PublishEx.i &ExMsg = "'Purchase Order Number ' + string(xxx) + '
> tied to this job still has open releases.'"}.
>
> End.
>
> End.
>
>
>
>
>
> Rob Bucek
>
> Manufacturing Engineer
>
> PH: (715) 284-5376 ext 3111
>
> Mobile: (715)896-0590
>
> FAX: (715)284-4084
>
> <http://www.dsmfg.com/>
>
> (Click the logo to view our site) <http://www.dsmfg.com/>
>
>
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of jendmp
> Sent: Wednesday, May 26, 2010 5:06 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Prevent closing a job - BPM help
>
>
>
>
>
> Can someone help me with a BPM? I've been messing with this thing on and
> off for months but can't figure it out.
>
> I need to prevent a job from being closed if a. Open PO's exist or b.
> there is active labor (someone is clocked into the job).
>
> Anyone out there create something like this already?
>
> Jennifer Mesiano
> Walton Signage
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Rob thanks for this code. I was going to start working on it today if no one had replied, as Jen's suggestion is a GREAT one - so you just saved me an hour or 3 :).

Ken

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jendmp
Sent: Thursday, May 27, 2010 7:28 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Prevent closing a job - BPM help - Bayesian Filter detected spam



Rob, you are the BPM master! Thanks!

Jen

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "Rob Bucek" <rbucek@...> wrote:
>
> Try this...
>
>
>
> Method: Jobclosing.closejob
>
> PreProcess
>
> No condition
>
> Action: execute 4gl code
>
>
>
> /* Close Job Conditions */
>
>
>
> for each ttJobClosing where ttJobClosing.RowMod = 'U' or
> ttJobClosing.RowMod = 'A' and ttJobClosing.JobClosed = True no-lock.
>
> Find first PORel where ttJobClosing.Company = PORel.Company and
> ttJobClosing.JobNum = PORel.JobNum and PORel.OpenRelease = True no-lock
> no-error.
>
> If not available PORel Then Do:
>
> Find first LaborDtl where ttJobClosing.Company = LaborDtl.Company and
> ttJobClosing.JobNum = LaborDtl.JobNum and LaborDtl.ActiveTrans = True
> no-lock no-error.
>
> If not available LaborDtl Then Do:
>
> assign ttJobClosing.JobClosed = True.
>
> assign ttJobClosing.ClosedDate = Today.
>
> End.
>
> Else Do:
>
> Define Variable xyz as Integer.
>
> xyz = LaborDtl.AssemblySeq.
>
> Define Variable abc as Integer.
>
> abc = LaborDtl.OprSeq.
>
> {lib/PublishEx.i &ExMsg = "'Assembly ' + string(xyz) + ', Operation
> Sequence ' + string(abc) + ' is still an active labor transaction.'"}.
>
> End.
>
> End.
>
> Else Do:
>
> Define Variable xxx as Integer.
>
> xxx = PoRel.PONum.
>
> {lib/PublishEx.i &ExMsg = "'Purchase Order Number ' + string(xxx) + '
> tied to this job still has open releases.'"}.
>
> End.
>
> End.
>
>
>
>
>
> Rob Bucek
>
> Manufacturing Engineer
>
> PH: (715) 284-5376 ext 3111
>
> Mobile: (715)896-0590
>
> FAX: (715)284-4084
>
> <http://www.dsmfg.com/>
>
> (Click the logo to view our site) <http://www.dsmfg.com/>
>
>
>
>
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
> Of jendmp
> Sent: Wednesday, May 26, 2010 5:06 PM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Prevent closing a job - BPM help
>
>
>
>
>
> Can someone help me with a BPM? I've been messing with this thing on and
> off for months but can't figure it out.
>
> I need to prevent a job from being closed if a. Open PO's exist or b.
> there is active labor (someone is clocked into the job).
>
> Anyone out there create something like this already?
>
> Jennifer Mesiano
> Walton Signage
>
>
>
>
>
> [Non-text portions of this message have been removed]
>



[Non-text portions of this message have been removed]