question

Rafael C4 avatar image
0 Likes"
Rafael C4 asked Joerg Vogel answered

How to stop Person walking in a preemption

Im building a model in which, at some point, all tokens in the process flow are released to another activity, so I'm using preemption. Each token is a Person on the 3D model view.

Although in the process flow all tokens are thrown to a new activity, especifically the "Walk" actions by the Persons are not stopped at all. So before they started walking towards their new task, they are finishing walking to their previuos destination, and that is causing several errors later.

So my question is, how do I stop them from finishing their walk (stop where they are) and start their new task?

processflowpreemptionactivitywalk
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

Can you describe how you let the persons do their task, or you add a picture of the activities or you attach a smaller sample model?

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

In a travel, load or unload activity the person has to finish the current task. If you preempt the token in the activity the task must preempted, too. If you look into the manual (Reference), you find the preempting of task sequences. You need another task (travel, load, Traveltoloc,...) that the person should do. And this task must be dispatched in a tasksequence to the person. The head of a tasksequence contains a parameter while it is created, how the currently executed tasksequence should be handled or preempted:

  1. the preempted tasksequence will be executed later again.
  2. the preempted tasksequence is aborted and deleted.
  3. the preempted tasksequence is aborted, deleted and all stored tasksequence in the tasksequencequeue are deleted, too.

In your case the preempted token must do at next activity create a tasksequence and the preempt parameter must be set set to 2 or 3. Then you add activities that contains at least a task operation like travel, traveltoloc, load, unload and then you dispatch the created tasksequence in an activity. That's stops the current doing travel task.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

If your persons are traveling on a network you can use the FlexScript command redirectnetworktraveler(object traveler, new destination reference on the network).

After preempting the travel task activity the token preempts to a custom code activity where you let execute the command.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.