Windows Workflow - Jump to Activity

  • Thread starter Thread starter Cesar
  • Start date Start date
C

Cesar

Hello.

Is there a way to jump to a target activity, no matter if it is direct
connected to a source ativity or no?

I need this to treat with business exceptions that always catch us (if I try
set tons of IFs/LOOPs, I notice that will make my model a little bizarre to
understand).


Cesar
 
This is about Visual Studio Net or any related Net product.

This is a system admin and developers newsgroup about Net,I try to
understand were your problem is about.

Cor
 
This is about Visual Studio Net or any related Net product.

This is a system admin and developers newsgroup about Net,I try to
understand were your problem is about.

Cor
 
Cor Ligthert said:
This is about Visual Studio Net or any related Net product.

This is a system admin and developers newsgroup about Net,I try to
understand were your problem is about.

Cor

The OP is talking about .Net Windows Workflow.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4063 (20090508) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Cor Ligthert said:
This is about Visual Studio Net or any related Net product.

This is a system admin and developers newsgroup about Net,I try to
understand were your problem is about.

Cor

The OP is talking about .Net Windows Workflow.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4063 (20090508) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Cesar said:
Hello.

Is there a way to jump to a target activity, no matter if it is direct
connected to a source ativity or no?

I need this to treat with business exceptions that always catch us (if I
try set tons of IFs/LOOPs, I notice that will make my model a little
bizarre to understand).

If I understand you correctly, then I don't think you can do this. I think
you're going to have to set IfElseBranches to get to the desired Activity.

You might want to look into this. Can you start a Workflow within a Workflow
with the other Workflow having the Activity you want to do, kind of like
jumping I guess?

The other thing you might want to look into is injecting the business object
into a Workflow (object injection), whereas, the whole business object is
injected into a Workflow, and the Workflow acts upon the properties and
methods of the business object as a whole to validate the object. With
object injection into a Workflow, you might have more control



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4063 (20090508) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Cesar said:
Hello.

Is there a way to jump to a target activity, no matter if it is direct
connected to a source ativity or no?

I need this to treat with business exceptions that always catch us (if I
try set tons of IFs/LOOPs, I notice that will make my model a little
bizarre to understand).

If I understand you correctly, then I don't think you can do this. I think
you're going to have to set IfElseBranches to get to the desired Activity.

You might want to look into this. Can you start a Workflow within a Workflow
with the other Workflow having the Activity you want to do, kind of like
jumping I guess?

The other thing you might want to look into is injecting the business object
into a Workflow (object injection), whereas, the whole business object is
injected into a Workflow, and the Workflow acts upon the properties and
methods of the business object as a whole to validate the object. With
object injection into a Workflow, you might have more control



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4063 (20090508) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Yeah, I guess you understood what I wanted to do.

Just to make sure, wonder a workflow that has the following statuses
(created from my mind):

- Filling > InApproval > Approved > InAccounting > Accounted

Lets say, if in status "InAccounting", a fix is eventually required, I want
to send the process to "Filling" status so the right person can fix it.

Yes, we could use the IfElse but it becomes very complex depending of the
workflow size and how much IfElses/Loops/etc. you must set for each possible
situation.

In other hand, if I had written my own workflow engine controlled by
database, my only work would change the "StatusId" in the database and
that's done! No complexity in the flow.

I'd like to see such flexibility in the WWF, but if it doesn't.. it will
stand as is. ^^

Thanks
Cesar
 
Yeah, I guess you understood what I wanted to do.

Just to make sure, wonder a workflow that has the following statuses
(created from my mind):

- Filling > InApproval > Approved > InAccounting > Accounted

Lets say, if in status "InAccounting", a fix is eventually required, I want
to send the process to "Filling" status so the right person can fix it.

Yes, we could use the IfElse but it becomes very complex depending of the
workflow size and how much IfElses/Loops/etc. you must set for each possible
situation.

In other hand, if I had written my own workflow engine controlled by
database, my only work would change the "StatusId" in the database and
that's done! No complexity in the flow.

I'd like to see such flexibility in the WWF, but if it doesn't.. it will
stand as is. ^^

Thanks
Cesar
 
Cesar said:
Yeah, I guess you understood what I wanted to do.

Just to make sure, wonder a workflow that has the following statuses
(created from my mind):

- Filling > InApproval > Approved > InAccounting > Accounted

Lets say, if in status "InAccounting", a fix is eventually required, I
want to send the process to "Filling" status so the right person can fix
it.

I am just getting into Workflow for an upcoming project. I am learning fast
and on the fly.

So, why cat you do a "Custom Activity", whereas, another Workflow contains
this Custom Activity "Filling"?

There is nothing stopping you on a Activity_code_Execution to start another
Workflow with its Activity doing a Dependency Injection of an object from
one Workflow to another Workflow and act upon the object's properties and
methods.

That way, you branch out of the execution path of a workflow to another
workflow and return.

Object injection into a Workflow is talked about in the link.

http://www.devx.com/codemag/Article/36317/1763/page/5



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4065 (20090511) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Cesar said:
Yeah, I guess you understood what I wanted to do.

Just to make sure, wonder a workflow that has the following statuses
(created from my mind):

- Filling > InApproval > Approved > InAccounting > Accounted

Lets say, if in status "InAccounting", a fix is eventually required, I
want to send the process to "Filling" status so the right person can fix
it.

I am just getting into Workflow for an upcoming project. I am learning fast
and on the fly.

So, why cat you do a "Custom Activity", whereas, another Workflow contains
this Custom Activity "Filling"?

There is nothing stopping you on a Activity_code_Execution to start another
Workflow with its Activity doing a Dependency Injection of an object from
one Workflow to another Workflow and act upon the object's properties and
methods.

That way, you branch out of the execution path of a workflow to another
workflow and return.

Object injection into a Workflow is talked about in the link.

http://www.devx.com/codemag/Article/36317/1763/page/5



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4065 (20090511) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Hmm... no, I'm not wanting to inject an object into. It is just switching
from any activity to any other activity in the same workflow. All the status
I told ( Filling > InApproval > Approved > InAccounting > Accounted ) could
be controlled by some HandleExternalEventActivity, but the WF only gives us
the ability to follow a well-defined flow.
I just want to jump to another activity, disrespecting the regular flow.
 
Hmm... no, I'm not wanting to inject an object into. It is just switching
from any activity to any other activity in the same workflow. All the status
I told ( Filling > InApproval > Approved > InAccounting > Accounted ) could
be controlled by some HandleExternalEventActivity, but the WF only gives us
the ability to follow a well-defined flow.
I just want to jump to another activity, disrespecting the regular flow.
 
Cesar said:
Hmm... no, I'm not wanting to inject an object into. It is just switching
from any activity to any other activity in the same workflow. All the
status I told ( Filling > InApproval > Approved > InAccounting >
Accounted ) could be controlled by some HandleExternalEventActivity, but
the WF only gives us the ability to follow a well-defined flow.
I just want to jump to another activity, disrespecting the regular flow.

Man, I don't know. On the other hand, what is to say that you can't call
another method within the method you're in, in the current Workflow? After
all, a code-Activity method is just another method, right? And as long as
you give the method called the parameters it expects of (object sender,
EventArg e), what's to say that you can't make that call, right? <smile>

I would say give the "sender" and "e" in the current code-Activity method
to the called method, make the call to the other code-Activity method and
see what happens.

What do you have to loose?








__________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Cesar said:
Hmm... no, I'm not wanting to inject an object into. It is just switching
from any activity to any other activity in the same workflow. All the
status I told ( Filling > InApproval > Approved > InAccounting >
Accounted ) could be controlled by some HandleExternalEventActivity, but
the WF only gives us the ability to follow a well-defined flow.
I just want to jump to another activity, disrespecting the regular flow.

Man, I don't know. On the other hand, what is to say that you can't call
another method within the method you're in, in the current Workflow? After
all, a code-Activity method is just another method, right? And as long as
you give the method called the parameters it expects of (object sender,
EventArg e), what's to say that you can't make that call, right? <smile>

I would say give the "sender" and "e" in the current code-Activity method
to the called method, make the call to the other code-Activity method and
see what happens.

What do you have to loose?








__________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Yeah, we can call every code in the workflow as well. It can be done, but...
you don't really jump to a workflow step just calling it's associated
method.

For example, if I'm currently at activity (HandleExternalEvent)
'InApproval'. It is waiting an user interaction to move the flow. Now,
imagine that the user clicks a form button named 'Reproval', what should
send the flow back to another HandleExternalEvent activity called 'Filling',
which will wait for another user interaction.

So, just calling the associated method does not set the flow back to
beginning. If no treats are done, the workflow will just go forward.

Again, for newcomers, no IfElseBranch or Loop are wanted. Depending of the
size and complexity of the workflow, these things will just help to mess up
the design.
 
Yeah, we can call every code in the workflow as well. It can be done, but...
you don't really jump to a workflow step just calling it's associated
method.

For example, if I'm currently at activity (HandleExternalEvent)
'InApproval'. It is waiting an user interaction to move the flow. Now,
imagine that the user clicks a form button named 'Reproval', what should
send the flow back to another HandleExternalEvent activity called 'Filling',
which will wait for another user interaction.

So, just calling the associated method does not set the flow back to
beginning. If no treats are done, the workflow will just go forward.

Again, for newcomers, no IfElseBranch or Loop are wanted. Depending of the
size and complexity of the workflow, these things will just help to mess up
the design.
 
Back
Top