"Hi people, I need to invoke a workflow ONLY when the status of a field moves from , say X to Y. Any thoughts? Cheers, Karan //*-------- INTERESTED IN THIS MESSAGE? RELATED CONTENT -------- Netweaver Enterprise Portal with Security and Workflow!! http://www.ittoolbox.com/ext/39464 -------------------------------------------------------------*// "

I don't see a way to put conditions on my workflow Policy such that,
only when the status of my Activity changes from Not Started to In
Progress, invoke the workflow. I believe its more generic - as in - call
the Workflow, when Activity status is changed, or Updated.

What about creating an another field to store a previous status and check the same in the policy .

say create a policy having conditions like
Field Name Status
Previous Act status = Not Started
Act Status = In progress

Moreover i don't understand why u need this ? you can even execute the WF if the status is changed to In progress.

or the reqt is WF should be executed only if the status changed from Not Started to In progress and there are the possibilies that user can choose a In progress status from diff statuses other then Not started ?

Cheers
Piyush

-----Original Message-----
Thanks Paul,

I don't see a way to put conditions on my workflow Policy such that,
only when the status of my Activity changes from Not Started to In
Progress, invoke the workflow. I believe its more generic - as in - call
the Workflow, when Activity status is changed, or Updated.

My requirement is to set the Activity Due Date to Today() + 2, only when
Activity goes from Not Started to In Progress.

The business might want to put the status to Pending, from In Progress,
and then bring it back to In Progress, in which case the workflow gets
triggered again, and assigns a new Due Date. So, basically, the State
model doesn't enforce that the Status cannot be moved backwards to In
Progress.

Ideal option would be to do it via workflow policy or runtime events,
but not sure if its possible. ( it wasn't back in the days of Siebel 5,
as I see on support web)

There are other options which involve configuration and /or scripting,
and which will help me achieve what I want, but I am looking for a
""pure"" solution :)

What about creating an another field to store a previous status and
check the same in the policy .

say create a policy having conditions like
Field Name Status
Previous Act status = Not Started
Act Status = In progress

Moreover i don't understand why u need this ? you can even execute the
WF if the status is changed to In progress.

or the reqt is WF should be executed only if the status changed from Not
Started to In progress and there are the possibilies that user can
choose a In progress status from diff statuses other then Not started ?

Cheers
Piyush

-----Original Message-----
Thanks Paul,

I don't see a way to put conditions on my workflow Policy such that,
only when the status of my Activity changes from Not Started to In
Progress, invoke the workflow. I believe its more generic - as in - call

Subject
RE:[siebel-dev-l] Invoke Workflow when value of Field , changes from X to
Y

Hello karan

What about creating an another field to store a previous status and check
the same in the policy .

say create a policy having conditions like
Field Name Status
Previous Act status = Not Started
Act Status = In progress

Moreover i don't understand why u need this ? you can even execute the WF
if the status is changed to In progress.

or the reqt is WF should be executed only if the status changed from Not
Started to In progress and there are the possibilies that user can choose
a In progress status from diff statuses other then Not started ?

Cheers
Piyush

-----Original Message-----
Thanks Paul,

I don't see a way to put conditions on my workflow Policy such that,
only when the status of my Activity changes from Not Started to In
Progress, invoke the workflow. I believe its more generic - as in - call
the Workflow, when Activity status is changed, or Updated.

Not sure if you are following the thread, but yes I have.
If you have a solution using Run Time events, can you be please be a bit
more specific, so I know where you are coming from, or what you have in
mind.

Subject
RE:[siebel-dev-l] Invoke Workflow when value of Field , changes from X
to
Y

Hello karan

What about creating an another field to store a previous status and
check
the same in the policy .

say create a policy having conditions like
Field Name Status
Previous Act status = Not Started
Act Status = In progress

Moreover i don't understand why u need this ? you can even execute the
WF
if the status is changed to In progress.

or the reqt is WF should be executed only if the status changed from Not

Started to In progress and there are the possibilies that user can
choose
a In progress status from diff statuses other then Not started ?

Cheers
Piyush

-----Original Message-----
Thanks Paul,

I don't see a way to put conditions on my workflow Policy such that,
only when the status of my Activity changes from Not Started to In
Progress, invoke the workflow. I believe its more generic - as in - call

Can you please explain : how Can I restrict my workflow to invoke, IF
and ONLY IF : the status changes from Not Started to In Progress.

Activity Status might change to In Progress more than once during the
entire life cycle of the Activity. But, I only want the workflow to get
invoked once, ONLY ONCE - when status of the Activity changes from Not
Started to In Progress.

From a business perspective, the status of the Activity will NEVER go
back to Not Started, but it may go back to In Progress, say from
Pending , for example.

That's where I want to restrict the workflow from getting invoked the
second time.

What i mean to say is in PreSetField Value , grab the previous value and and set a field . for that You have to extend a table and have to create a new field as well.

And in policies create a condition and check the Previous value as well alongwith the current status . If the previous Value is ""Not Started "" then only triger the WF..

Cheers
Karan

-----Original Message-----
Thanks Piyush,

Not sure how I can validate against 'Old' and 'New Statuses'

My requirement is to set the Activity Due Date to Today() + 2, only when
Activity goes from Not Started to In Progress.

The business might want to put the status to Pending, from In Progress,
and then bring it back to In Progress, in which case the workflow gets
triggered again, and assigns a new Due Date. So, basically, the State
model doesn't enforce that the Status cannot be moved backwards to In
Progress.

Ideal option would be to do it via workflow policy or runtime events,
but not sure if its possible. ( it wasn't back in the days of Siebel 5,
as I see on support web)

There are other options which involve configuration and /or scripting,
and which will help me achieve what I want, but I am looking for a
""pure"" solution :)

What i mean to say is in PreSetField Value , grab the previous value and
and set a field . for that You have to extend a table and have to create
a new field as well.

And in policies create a condition and check the Previous value as well
alongwith the current status . If the previous Value is ""Not Started ""
then only triger the WF..

Cheers
Karan

-----Original Message-----
Thanks Piyush,

Not sure how I can validate against 'Old' and 'New Statuses'

My requirement is to set the Activity Due Date to Today() + 2, only when

Activity goes from Not Started to In Progress.

The business might want to put the status to Pending, from In Progress,
and then bring it back to In Progress, in which case the workflow gets
triggered again, and assigns a new Due Date. So, basically, the State
model doesn't enforce that the Status cannot be moved backwards to In
Progress.

Ideal option would be to do it via workflow policy or runtime events,
but not sure if its possible. ( it wasn't back in the days of Siebel 5,
as I see on support web)

There are other options which involve configuration and /or scripting,
and which will help me achieve what I want, but I am looking for a
""pure"" solution :)

Can you not do a query on the Activity status (setsearchspec(""Id"",
GetFieldValue(""Id""))) - this will give you the current status i.e. Not
Started or Pending
and the FieldValue param on PreSet will give you the New Value i.e. In
Progress

Subject
RE: [siebel-dev-l] Invoke Workflow when value of Field , changes from X to
Y

Thanks Piyush,

Not sure how I can validate against 'Old' and 'New Statuses'

My requirement is to set the Activity Due Date to Today() + 2, only when
Activity goes from Not Started to In Progress.

The business might want to put the status to Pending, from In Progress,
and then bring it back to In Progress, in which case the workflow gets
triggered again, and assigns a new Due Date. So, basically, the State
model doesn't enforce that the Status cannot be moved backwards to In
Progress.

Ideal option would be to do it via workflow policy or runtime events,
but not sure if its possible. ( it wasn't back in the days of Siebel 5,
as I see on support web)

There are other options which involve configuration and /or scripting,
and which will help me achieve what I want, but I am looking for a
""pure"" solution :)

What about creating an another field to store a previous status and
check the same in the policy .

say create a policy having conditions like
Field Name Status
Previous Act status = Not Started
Act Status = In progress

Moreover i don't understand why u need this ? you can even execute the
WF if the status is changed to In progress.

or the reqt is WF should be executed only if the status changed from Not
Started to In progress and there are the possibilies that user can
choose a In progress status from diff statuses other then Not started ?

Cheers
Piyush

-----Original Message-----
Thanks Paul,

I don't see a way to put conditions on my workflow Policy such that,
only when the status of my Activity changes from Not Started to In
Progress, invoke the workflow. I believe its more generic - as in - call

You can use global variables (SetSharedGlobal) or the user
profile (SetProfileAttr) to save the old and new values in the
PresetFieldValue event. Then you can use those values
(GetSharedGlobal or GetProfileAttr) when writing the rule sets
that you'll link with runtime event.
This way you don't need to extra configuration

I hope this helps you

Regards,

Jorge Cardona

-----Original Message-----
Yes, that's a solution.
I have a few in my bucket too, that I could use, but as I said
before, I
want to do it ""cleanly"", without any extra configuration.

You are going to have to use script to accomplish this - one way or the
other. We have a requirement that is similar and here is what I did:

Requirement: When the Severity of an SR gets ""upgraded"" (meaning from
4-Low to 3-Medium, 2-High, or 1-Critical, or 3-Medium to 2-High or
1-Critical, or 2-High to 1-Critical), a WF process should fire.
Likewise, when it gets downgraded, another workflow should fire.

This cannot be done via policy, because if the SR changes to 3-Medium,
you do not know whether it originally was 2-High or 4-Low.

We wrote script that compared previous values with the changed value and
set a profile attribute as follows:

// NPS 10/26/2006 - added condition for when curr_sev =
0, which is when the SR is first saved
if (ToNumber(curr_sev_num) > 0)
{
// NPS 09/20/2006 - The higher the
severity, the lower the number, hence the <
if (new_sev_num < curr_sev_num)
{

Personally I would rather have it this way than creating a new dB column
and maintaining previous values at the database level. At least with
the way I have done it, there are no dB changes, if that makes a
difference to some.

What i mean to say is in PreSetField Value , grab the previous value and
and set a field . for that You have to extend a table and have to create
a new field as well.

And in policies create a condition and check the Previous value as well
alongwith the current status . If the previous Value is ""Not Started ""
then only triger the WF..

Cheers
Karan

-----Original Message-----
Thanks Piyush,

Not sure how I can validate against 'Old' and 'New Statuses'

My requirement is to set the Activity Due Date to Today() + 2, only when

Activity goes from Not Started to In Progress.

The business might want to put the status to Pending, from In Progress,
and then bring it back to In Progress, in which case the workflow gets
triggered again, and assigns a new Due Date. So, basically, the State
model doesn't enforce that the Status cannot be moved backwards to In
Progress.

Ideal option would be to do it via workflow policy or runtime events,
but not sure if its possible. ( it wasn't back in the days of Siebel 5,
as I see on support web)

There are other options which involve configuration and /or scripting,
and which will help me achieve what I want, but I am looking for a
""pure"" solution :)

If you're using Siebel 7.7 or later then write it as
a Runtime Event in the connector leading from the start
step of the Workflow Process, you can add the preconditi
ons to the event. This doesn't require any script or a
ny additional sever components so is the cleanest way to
get this functionality working.

Can you please explain : how Can I restrict my workflo
w to invoke, IF
and ONLY IF : the status changes from Not Started to
In Progress.

Activity Status might change to In Progress more than on
ce during the
entire life cycle of the Activity. But, I only want th
e workflow to get
invoked once, ONLY ONCE - when status of the Activity
changes from Not
Started to In Progress.

From a business perspective, the status of the Activity
will NEVER go
back to Not Started, but it may go back to In Progre
ss, say from
Pending , for example.

That's where I want to restrict the workflow from gettin
g invoked the
second time.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Sec
urity System.
For more information please visit http://www.messagelabs.com/ema
il
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Sec
urity System.
For more information please visit http://www.messagelabs.com/ema
il
______________________________________________________________________

If you're using Siebel 7.7 or later then write it as
a Runtime Event in the connector leading from the start
step of the Workflow Process, you can add the preconditi
ons to the event. This doesn't require any script or a
ny additional sever components so is the cleanest way to
get this functionality working.

Can you please explain : how Can I restrict my workflo
w to invoke, IF
and ONLY IF : the status changes from Not Started to
In Progress.

Activity Status might change to In Progress more than on
ce during the
entire life cycle of the Activity. But, I only want th
e workflow to get
invoked once, ONLY ONCE - when status of the Activity
changes from Not
Started to In Progress.

From a business perspective, the status of the Activity
will NEVER go
back to Not Started, but it may go back to In Progre
ss, say from
Pending , for example.

That's where I want to restrict the workflow from gettin
g invoked the
second time.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Sec
urity System.
For more information please visit http://www.messagelabs.com/ema
il
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Sec
urity System.
For more information please visit http://www.messagelabs.com/ema
il
______________________________________________________________________

What i mean to say is in PreSetField Value , grab the previous value and
and set a field . for that You have to extend a table and have to create
a new field as well.

And in policies create a condition and check the Previous value as well
alongwith the current status . If the previous Value is ""Not Started ""
then only triger the WF..

Cheers
Karan

-----Original Message-----
Thanks Piyush,

Not sure how I can validate against 'Old' and 'New Statuses'

My requirement is to set the Activity Due Date to Today() + 2, only when

Activity goes from Not Started to In Progress.

The business might want to put the status to Pending, from In Progress,
and then bring it back to In Progress, in which case the workflow gets
triggered again, and assigns a new Due Date. So, basically, the State
model doesn't enforce that the Status cannot be moved backwards to In
Progress.

Ideal option would be to do it via workflow policy or runtime events,
but not sure if its possible. ( it wasn't back in the days of Siebel 5,
as I see on support web)

There are other options which involve configuration and /or scripting,
and which will help me achieve what I want, but I am looking for a
""pure"" solution :)

What i mean to say is in PreSetField Value , grab th
e previous value and
and set a field . for that You have to extend a ta
ble and have to create
a new field as well.

And in policies create a condition and check the Previou
s value as well
alongwith the current status . If the previous Value is
""Not Started ""
then only triger the WF..

Cheers
Karan

-----Original Message-----
Thanks Piyush,

Not sure how I can validate against 'Old' and 'New Sta
tuses'

My requirement is to set the Activity Due Date to Toda
y() + 2, only when

Activity goes from Not Started to In Progress.

The business might want to put the status to Pending,
from In Progress,
and then bring it back to In Progress, in which case
the workflow gets
triggered again, and assigns a new Due Date. So, basical
ly, the State
model doesn't enforce that the Status cannot be moved ba
ckwards to In
Progress.

Ideal option would be to do it via workflow policy or
runtime events,
but not sure if its possible. ( it wasn't back in th
e days of Siebel 5,
as I see on support web)

There are other options which involve configuration and /o
r scripting,
and which will help me achieve what I want, but I am
looking for a
""pure"" solution :)

______________________________________________________________________
This email has been scanned by the MessageLabs Email Sec
urity System.
For more information please visit http://www.messagelabs.com/ema
il
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Sec
urity System.
For more information please visit http://www.messagelabs.com/ema
il
______________________________________________________________________

Hi:
I think that you can add another field on the business component level
where the value of that field will be the comparison between X and Y and
you can invoke the needed workflow if that condition fulfilled