How to create an Error action to stop the process

Options
Lidemao
edited March 28 in Modeling

How to create a simply Error action to stop the process, Such as use a False/True filter, I want to stop the process when other user execute the process in the same time… Thanks

Answers

  • Dikshant
    Options

    Parallel execution won't happen in anaplan, if 2 users run an action, it runs on by one.

  • Lidemao
    Options

    Hi,Dikshant Thank you for your reply

    the same question with Data locking , I create the DCA model and create a “Lock” action, Then add this action to a process.

    1.The A user lock the DCA model line item,

    2.The B user still can run the process which added the “Lock” action

    IS there any Error action to stop the process when the B user run the process?

  • SriNitya
    Options

    @Lidemao
    Hi, In the Post of Data locking and validation is done to set module access(write) for non admin user who has read access only but it allows import data into Anaplan it is not regarding multiple users running the process.
    In my sample model I use the “Lock / Unlock” actions to allow a non-Admin end user to import into a table for which they should generally have read only access. I use the “Data Check” action to draw attention to when a new product is added and requires a decision point, which avoids having to re-run imports and reduces the risk of missed steps.

    When User1 is running the process if user 2 also runs the same process it executes one after the other only.

  • Dikshant
    Options

    It should not be required but just an idea since the user list has a top level, You can use ANY function and get a Boolean if any user is locked to make the change. Using that Boolean, you can stop the process for others.

  • Lidemao
    Options

    Thanks for SriNitya and Dikshant

    I just need the “Data Check” action that can set up to intentionally fail and halt the process 

    User list is displayed in General List already, can be set a top level and subset, I am trying to create a stop action. May be the precondition must be a non-Admin end user. Thank you very much

  • NoahJ
    Options

    @Lidemao take a look at the second half of the video (starting at around 11:00) to see how I made my "intentionally failing action"

    Basically I took advantage of the fact that if you try to map a dimension to time and there are values but none of them map to a period then it does a "hard stop" failure - but if it the view simply does not have any rows, then it counts as "succeeded".

    So I have a "halt" boolean that I set up to be TRUE when I want the process to halt, then set up a view that displays rows based on that boolean (i.e. if "Halt" is FALSE, then no rows are displayed.). Then I set the action up using that saved view and include it in the process.

    In your case if you want it to be based on user you could potentially set up the view to use the User dimension, so that only one person at a time would be allowed to run the action or something like that, but I'm not entirely sure if/how it would work.

  • Lidemao
    edited April 10
    Options

    Hi, Dikshant and NoahJ 

    Use User top level create a stop action successfully.

    1.Create a general list: checklist item: A, B, C….

    2.Create a [Check lock on off] model (User Dimension) :

    line Item:

    Lock_Line_item: Boolean

    Lockfilter=Lock_Line_item[SELECT: Users.TTL]

    Create Error: IF Lock_Line_item[SELECT: Users.TTL] THEN "Nan" ELSE "A"
    Update check: No formula format: checklist

    Three action:

    1.Set Lock_Line_item true

    2.Set Lock_Line_item false

    3,Check action import [Create Error] to [Update check] filter: Lockfilter

    ※action mapping user: Ask each time import is run

    if the Lock_Line_item is true (Some User is running the process)

    Other user when run the check action it will failed. the process will stop.