cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically triggering workflow when price value is changed

Former Member
0 Kudos

Hi All,

My requirement is to trigger a workflow automatically whenever the price value is changed in the DM.

Can anybody guide me how can i design a workflow for this scenario and steps to trigger it automatically when price is changed....?

Regards

Sireesha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please follow the below steps:

1. Create one Time stamp field and select only the price field from the list of fields at the time of creation.

2. Create one Validation that checks the difference between your time stamp field and system time. If the difference is greater than 0 then return false else return true.

3. Create one workflow and sets its triggering action to record update.

Your Workflow should be like this

Start -> Branch -> {Perform the necessary steps you want to if price value has changed} -> Stop

Put the validation created in the Branch Step and another connection from Branch step will go to stop i.e. though the record is updated but price value is still the same so validation will return false.

Hope it helps

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

I need to give a warning message immedialtely once the price value has been chaned (excluding the Notify step ).

How can i design the workflow for the above reqmt?

I have autoluanch property to "warning" for my validation..

Regards

Sireesha.

Former Member
0 Kudos

Hi,

When Validation is used in the workflow error message will not be displayed.So use the same validation that i have pasted above and set its Automatic Execution = Warning and dont incorporate this validation in the workflow. Use this validation only in the Branch Step.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

I am getting the error whiile connecting branch step " the no.of connections to the branch step exceeds the limit".

I have deleted all the steps and closed visio n created new ones but still its giving the error. And i have tried by deleting and creating new workflow , created a new workflow visio still i could not connect to branch step.

How can i connect to the branch step?

Regards

Sireesha.

Regards

Sireesha.

Former Member
0 Kudos

Hi Sireesha,

Drag-Drop the Branch Step first and before connecting it to the next step give the validation name in the step properties of the Branch Step and then connect two steps to it first will be your logic like process,approve etc and another one will be stop step because we dont want to do anything if validation fails rite?

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

I understood what u have told. Whenever am dragging-droping connector step after the branch step its throwing error : "The number of connections to the branch step exceeds the limit" even if its for first time also throwing error.

So i have closed everything and reopened and done the same process still getting the error...

Any idea where could b the the problem?

Regards

Sireesha.

Former Member
0 Kudos

Hi Sireesha,

Please follow the below steps:

1. Drap Drop the Branch Step

2. Assign Validation name first before connecting it to any of the steps.

3. Once the Validation name is given you will get an extra field in the step property itself as the name ot the validation

4. Now connect a connector to the Branch Step.

5. In the Validation name (newly created in the Step property) give the step name to be moved if validation succeeds.

Hope u get a fair idea now.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi JItesh,

I am able to create it without any errors now.

Here am giving the branch properties apart from branch name and description.

Validations : Price Update ( My validation name created in main table). Afer assigning a validation name to this property the following two properties will get added.

Price Update : Process (step name i have given for "Process" step )

[default] : Stop (step name for Stop )

my design is like this : start->branch : (Its has 2 steps )

Step1 : -


process (Assignee is user1 )

-


Approve (Assignee is use2 )

Step 2: Stop.

I have changed the price value in the main table from mddweb.

What data User1 and user2 should get once they log in DM?

Can you please tell me when workflow is triggering automatically how the "process" and "approve" steps works?

I mean when u r triggering workflow manually u can review the records whichever u want and approve it thru the respective logged in users but if workflow is automatic how the records get approved and how do i know which record has been changed out of 3000 records.

Regards

Sireesha.

Former Member
0 Kudos

Hi sireesha,

Its good that your Workflow is saved properly.

Now set its triggering action to Record Update and Automatic Execution to Automatic.When ever you change the price field record gets updated and the workflow gets launched. Now the user assigned to the process step will get the workflow in its Task pane. When user1 clicks on this workflow, only the updated record will be visible in the Records Pane.

Hope I am able to clear your doubt of 3000 Records

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

Here am giving the validation and workflow properties :

Validation Properties :

Name : Price Update

Table : Catalog Items

Validation Expression : if (( timstamp-riceupdated)>0),false,true)

Automatic execution : Warning

(For this property only warning,error,none is available, as u said "Automatic" is not available)

Workflow Properties :

Table : Catalog Items

Workflow : Designed as discussed in the previous post

Active : Yes

Trigger Actions : Record Update

Autoluanch : Immediate

(Only immediate,none,threshold are available)

The result of the above workflow is working only upto validation part.i.e, am getting the warning message once the record has bee updated. but if i login with the process user and approve users i cannt see the workflow and record that is updated.

As u said in the previous post for which property i shoud set "automatic". I cannt find this "autolaunch" either for Autoluanch property of workflow or Automatic Execution property of validation.

Please clarify it...

Thanks & regards

Sireesha.

Former Member
0 Kudos

Hi,

All the things u have done so far looks proper. Now the reason i could think is our validation is not running properly.

please perform the below steps to check whether validation is proper or not:

1. Set the Validation Automatiic Execution=None.

2. Update the Price value and run the Validation on that particular record. It should not give the validation message.

3. Update any main table field and run the validation it should give the validation message.

Once the above steps are proper. Login to MDM Data manager with the User of Workflow Owner by default it is Admin and perform all the workflow steps from this login only.

If its working fine then you must have missed the user assignment for process and approve steps of workflow i.e. owner can only process and approve the record

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

In DM as of now am working with owner of the workflow i.e., with the logon id mddweb. It has the roles : admin, catalog user, config etc., all roles are assigned to this user only..

Validation is working fine bcoz i have checked by setting "none" to the automatic execution property for the validation . and checked by changing the price field and other field in the catalog items. its working fine and I was not getting any warnig or error message since i set the property to "None".

In my case both admin and mddweb both are having the same roles. so i am working with mddweb only.

Do u mean shall i login with the admin user and do the creation of workflow, creation of validation, chaging the record etc., all these things here..

And reg assignee for process and approve steps..

if u can check in one of my replies i said that for process step assignee is user1 and for approve step assignee is user2.

user1 and user2 are assgined under the role : catalog user.

Above same users i have used when i was working with workflow-manual triggering.its was working fine.

I do not understand where its wrong...

please advice me....

Regards

Sireesha.

Regards

Sireesha.

Former Member
0 Kudos

Jitesh,

I missed to mention about one thing.

1 ) When automatic execution is set to none for the validation whatever the field u change i.e., its either price field or any other field in the main table its not throwing any error or warning message.

2 ) When automati execution set to "warning" its throwing the warning message irrespetive of the field change. ie., throwing message for both price field and any other field.

3) When automatic execution set to "error" its throwing error message for irrespective of the field change.

I think our validation is not working fine..

How should i check it ?

Regards

Sireesha.

Former Member
0 Kudos

Hi Jitesh,

Here am giving the validation expression

IF((TIMESTAMP-PRICE UPDATED)>0,FALSE,TRUE)

What this expression returns if it fails as per the above condition...

Please advice me in whcih we were doing wrong...

Thanks & regards

Sireesha.

Former Member
0 Kudos

Hi,

I checked the validation at my side its proper. It should give the error message (written in Error Message while creating error message) when you update fields except Price one.

Just check the field values and compare after updating the record. Hope your Time Stamp fields are proper i.e. TIMESTAMP field is for All the fields and PRICE UPDATED field is only for Price qualified table.

Note: Validation will not return any error message if you update any field of Qualified table irrespective of Price field.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Jitesh,

Can u please provide your validation properties including the expression.

I have given the error message also.

I have checked timestamp ,field , selected field is ALL only and for price updated its price information.

I am not understanding where its wrong in validation...

i will check with your validation properties...

Regards

Sireesha.

Former Member
0 Kudos

Hi,

Following are my Validation properties

Name - test

Description -

Table - {Main Table name}

Error Message - Price not updated

Automatic Execution - None (for time being to check it manually)

Callable - No

Expression - IF((TS1-PRICEUPDATED)>0,FALSE,TRUE)

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi jitesh,

I have given the same properties .but no success...

I have noticed that my timestamp field values are same for both the fields like timstamp and price updated..

whenever i change a record the time its showing same for both the fiedls timestamp and price updated.

I think as per our expression if timestamp-price updated >0 always returns false. bcoz if both values are same the condition fails. so i think this is the reason why my validation is not getting executed.

Can u please provide me ur timstamp data types and values of both..

Can u tell me by using system(negate()) functionality how can i write the validation for this scenario...if the above what v r using is incorrect(since timestamp values are same)

Please advice me ...

Regards

Sireesha.

Former Member
0 Kudos

Hi,

Just try one thing.Update any main table field other than that qualified table in which Price field exists and then check the timestamp fields.If both the values are same then there is a problem with the timestamp field creation.

Create the field as of type Time Stamp and modify the Selected Fields i.e. last property as per our requirement i.e. All for one TS field and only Qualified table name in which Price field exist for other TS.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Just a tip --

I've done this before, and using the system time as a reference in your validation doesn't work well. The solution is cloogey, and will fail if you have updates coming in with massive quantity. The best approach is to have a field with the time that the record was last updated, each time it gets updated, copy the value over with an assignment. Then compare the update time stamp to the previous time in that copied field. Then it's a one to one comparison, if they aren't equal, then the field has been updated.

Former Member
0 Kudos

Hi Jitesh,

I have checked the timestamp values for two conditions.

1) Updated the some other field in the main table except price field and checked the timestamp and price updated values. Both the these values are not same whenever i change any other field in the main table.

2) Updated only the price field in the main table then the values of timestamp and price updated are same. So as per these timestmp values our validation returns fails ( it returns 0 > 0 )

Can v set "ALL" to the price updated timestamp field. so that whenever v change the price value price updated will not be changed and timestamp will be changed ? If this will not work pls suggest me any idea...

Regards

Sireesha.

Former Member
0 Kudos

Hi,

According to me everything looks proper I dont know why you are still facing the issues.

Just check whether validation is returning error message in one of the conditions i.e. change only the main table field and changing only price field.

Please refer to the link below.It may help you

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60a2b4e4-6993-2a10-0e9a-c6d720f1571b]

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

Its problem with the timestamp selected fields. I have changed it some other fields in the main table. Now its working fine. I have executed the validation manually and automatic. Everything is working fine.I am able to do validation both for update and when adding a new record only if run them individually...

Am triggering a workflow when reocrd update and record add.

How can i combine the these condition into nested.

Here am giving the seperate expressions for update and add.

Update on price validation :

IF ((TIMESTAMP-PRICE UPDATED)>0,TRUE)

Validation when u add any record

IF (TIMESTAMP=PRICE UPDATED,TRUE)

The above two expressions are executing fine individually. But these should get executed at once whenever any record updated or add is happened. So for that i have used the below condition.

IF ((TIMESTAMP = PRICE UPDATED ) OR (TIMESTAMP-PRICE UPDATED ) > 0, TRUE)

The result of the above expression is only the first condition gets executed always . so its getting failed for update.

How can i nest the expressions for the above expression?

Regards

Sireesha.

Former Member
0 Kudos

Hi Sireesha,

One suggession from my side is create two separate Validations and two separate workflows. One workflow will get launched on record Add and another one is on Record Update.

This will make your design simpler.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

Thank you for all of your replies.

Its working fine. The issue has been solved.

Ponits has been assigned to u..

Thanks & Regards

Sireesha.

Answers (2)

Answers (2)

former_member201266
Contributor
0 Kudos

Hi Sireesha,

If you want an workflow to trigger automatically then i would recomed you to make changes to the properties of the work flow..

when you create a workflow under its properties you have an option as "Trigger Action" where in you can select "Record Update", in this case the workflow will start when ever a record is updated. and you set the "Autolaunch" option as "Immediate". Try this out, this might be usefull... In case you find any difficulty then let me know.

Cheers,

Cherry.

Former Member
0 Kudos

Hi,

We have an trigger action property in workflow where we can specify when should

workflow be triggered.According to your requirement record update option might be

suitable as a trigger action and select the launch property as automatic.

Thanks

Narendra

Former Member
0 Kudos

Hi Jitesh,

Can u please tell me clearly where i have to create a stamp field. Is it in main table "Catalog Items" ? please provide me the stamp field properties .

Regards

Sireesha.

Edited by: sireesha esukapalli on May 28, 2008 12:08 PM

Former Member
0 Kudos

Hi,

Yes you have to create the field in Main table itself and set its following properties:

1. Type = Time Stamp

2. Selected Fields = Price

Hope your price field is in Main table only if not then create the Time Stamp field in the table in which Price field is and also create the workflow on same table.

Let us know if any further help is required.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

Thanks for your prompt reply.

I have noticed that in my main table "Catalog Items" a field is already created with the type as "Time stamp" and selected field as "Price Information" Where price information is Lookup[Qualified Flat] (multi-valued).

( While importing price data via import manager we have actually mapped our source field price to this "price information" of the catalog items only.)

Can i use this field in my scenario and go ahead.

Regards

Sireesha.

Former Member
0 Kudos

Hi,

Yes you can use the qualified field as well. All the fields available in the drop down list can be used to update the time stamp field.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

Is this validation expression correct for our scenario?

IF ( (SYSTIME(NEGATE(10)-Price Updated ) > 0, FALSE,TRUE).

If not csn u please correct it?

Regards

Sireesha.

Former Member
0 Kudos

Hi,

One suggession from my side is create the two Time Stamp fields instead of one the reason is when you update the record and workflow gets launched there will be some delay because of which System time will never be same as the time stamp field.

For field Time Stamp 1 set the Selected Fields = ALL

For field Price Updated set the Selected Fields = Price

Now use the validation as given below

IF((TIMESTAMP1 - PRICE UPDATED) > 0 , FALSE , TRUE )

Hope you got the reason behind creating two time stamp fields.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi jitesh,

I do understand why two stamps need to be created. But i have one doubt on timestamp1.

If we set the selected field property for the timestamp1 to "ALL" it will calculate the time value whenever any field is changed in the main table no but as of now we are focusing on only one field which is price. Then how the time value for both the fields will get calculated?

Regards

Sireesha.

Former Member
0 Kudos

Hi,

Time Stamp1 will get updated when any field gets changed

Price Updated will get new updated value only when Price field get changed.

Since our workflow will get triggered on record update irrespective of field thats why we have kept this validation so that we can determine whether Price field got changed or not.

You can create N number of time stamp fields and all gets the value from system time simultaneously. But the value depends on the field list set for that time stamp field.

Regards,

Jitesh Talreja