Can we do conditional transition of states?

Discuss problems installing or using TrackStudio.

Can we do conditional transition of states?

Postby fcai » Thu Jul 02, 2009 12:40 am

one-to-many states case
A->B
A->C
A->D

Transition of state is based on execute script/trigger on a custom field value.
It is kind of dynamically transition from one state to one of other states based on certain custom field value.

Currently ,It looks like I can only relate transition to a given message which does not allow me to do dynamic transition of state.

Can we do that?


Thanks
fcai
 
Posts: 66
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Re: Can we do conditional transition of states?

Postby admin » Thu Jul 02, 2009 4:48 pm

Which TS version do you use ?
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7305
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

3.5.51

Postby fcai » Thu Jul 02, 2009 7:34 pm

3.5.51
I did some investigation and it seems like transition of state has be bound to the message creation which I could not do state transition on fly.
fcai
 
Posts: 66
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Postby Tr1aL » Mon Jul 06, 2009 4:57 pm

For example, before add message trigger
Code: Select all
String udfValue = message.getUdfValue("Name of Custom Field");
if (udfValue.equals("value 1"))
    message.setMstatus("Name of state B");
else if (udfValue.equals("value 2"))
    message.setMstatus("Name of state C");
else if (udfValue.equals("value 3"))
    message.setMstatus("Name of state D");
return message;
Tr1aL
TrackStudio Support
 
Posts: 60
Joined: Tue Apr 15, 2008 10:48 pm
Location: Smolensk

But how to define the transition in this case?

Postby fcai » Mon Jul 06, 2009 7:32 pm

Thanks, Tr1aL.

Should I do multiple Starting State like this and how?

A->B
A->C
A->D
fcai
 
Posts: 66
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Postby Tr1aL » Mon Jul 06, 2009 8:49 pm

Yes
Tr1aL
TrackStudio Support
 
Posts: 60
Joined: Tue Apr 15, 2008 10:48 pm
Location: Smolensk

Still not understand

Postby fcai » Mon Jul 06, 2009 9:06 pm

In order to do A->B,A->C, A->D, It looks like I need create at least 3 types of messages associated with it.

Is anyway I can do this dynamic transition in one message creation?
fcai
 
Posts: 66
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Here is what I tried based on your suggestion:

Postby fcai » Tue Jul 07, 2009 12:26 am

1. create before add message trigger (or after add message trigger)
CT(conditional transition) with the following script code:

String udfValue = message.getUdfValue("Cost");
if (udfValue.equals("100"))
message.setMstatus("B");
else if (udfValue.equals("200"))
message.setMstatus("C");
else if (udfValue.equals("300"))
message.setMstatus("D");
return message;

2. create workflow "Conditional Transition Flow" with state 'A', 'B', 'C', 'D'.

3. create a message type 'note' with transition from 'A'->' A'
and using predefined trigger 'CT'. (can not do 'A' to 'B', 'A' to 'C' or 'A' to 'D' in same message type note)


4 create custom field 'Cost' in "Conditional Transition Flow' with type Integer(Also tried String type too and not working neither).

Set value=200

5. Then I create Category 'Purchase' using 'Conditional Transition flow'

6. create a project from category above.

7. create message 'note' in project and project state still in 'A', it does not jump to 'B'.



Have I done something wrong here or missed something?


Thanks,

Fred
fcai
 
Posts: 66
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Postby Tr1aL » Wed Jul 08, 2009 12:27 am

Sorry, I don't understand you in last message.
Trackstudio save history of state transactions, on it you should create transactions for all state changes.
Create:
Note B (A->B)
Note C (A->C)
Note D (A->D)
After that you can use them in triggers.
Tr1aL
TrackStudio Support
 
Posts: 60
Joined: Tue Apr 15, 2008 10:48 pm
Location: Smolensk

does this mean I can not do dynamic state transition?

Postby fcai » Wed Jul 08, 2009 1:11 am

Tr1aL wrote:Sorry, I don't understand you in last message.
Trackstudio save history of state transactions, on it you should create transactions for all state changes.
Create:
Note B (A->B)
Note C (A->C)
Note D (A->D)
After that you can use them in triggers.



Thanks a lot, Tr1aL.

So basically I could not do state transition on fly based on value of a custom field in one state transaction (create a message for project), correct?

I think it will be very nice if you can provide this feature in your future release.

Fred
fcai
 
Posts: 66
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA


Return to TrackStudio Support

Who is online

Users browsing this forum: Google [Bot] and 0 guests