BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  User Attribute mismatch

    Posted Wed September 16, 2020 03:23 AM
    Hi All,

    I have several question...

    1.
    We had an application which defined a user attribute with name "BranchCode". Later I removed it from the application, but it was still visible in the Process Admin Console. Ho can we remove unnecessary user attributes from the system?

    2.
    So, we had this "BranchCode" user attribute mentioned in question 1. above. Later we created a new application, which defined the "BranchCode" user attribute again. Now we have two "BranchCode" user attributes (with the application name in parentheses):


    How can we distinguish between the two attributes? How can we set/get either or other? Or setting the "BranchCode" attribute will set both? Or should we use the name "BranchCode (KLaci POC)" and "BranchCode (SB Contract Generator"? In this case what if we deploy either but not the other to a production server? What name will become the only attribute?

    3.
    If we develop more applications with the same user attributes for the same customer (like "BranchCode"), there will be as many attributes as the number of the applications? Is it possible somehow to "merge" these attributes: if exists, do not create a new, if not, then create it?

    4.
    What if we place it in a toolkit which is used by many applications? In this case BAW will create only one user attribute, or more?

    Could anybody help us to anwser these questions please?

    Thx,


    ------------------------------
    ____________________
    Laszlo
    ------------------------------


  • 2.  RE: User Attribute mismatch

    Posted Wed September 16, 2020 11:23 AM
    It is better create unique attributes per whole environment.
    TWUser.attributes seems to return only unique attributes – so it contains only one value per unique attribute name. My experience from version 19.0.0.3 is that returned value is last non-empty setting (e.g. from recently created application or toolkit). Attributes are global and it does not matter where have been defined (in application or in toolkit). They are accessible by all applications (and REST API).

    ad 1. It is cached. Should disappear after environment restart.
    ad 2. Avoid such situations. Last installed app with not empty value for user wins.
    ad 3. It is created when deployed. So keep it in one place e.g. in toolkit.
    ad 4. If created in toolkit it belongs to toolkit. You don't have to even attach toolkit to application - attributes are global.

    ------------------------------
    Sebastian Tylko
    ------------------------------



  • 3.  RE: User Attribute mismatch

    Posted Wed September 16, 2020 11:31 AM
    Hi Sebastian,

    Thanks for your reply!

    So, if I place all the user attributes for a customer's company users in a toolkit, and will use this toolkit many times in many applications, the attributes will not duplicate? Did I understand well?

    Thx,

    ------------------------------
    ____________________
    Laszlo
    ------------------------------



  • 4.  RE: User Attribute mismatch

    Posted Wed September 16, 2020 12:38 PM
    yes.

    ------------------------------
    Sebastian Tylko
    ------------------------------



  • 5.  RE: User Attribute mismatch

    Posted Wed September 16, 2020 12:43 PM
    Okay, many thanks Sebastian!

    And the final question: how can we delete the unnecessary user attributes from the server? I did delete in the Process Designer, but it is still there in the Process Admin Console / Bulk User Attributes.

    Maybe you know a trick... :)

    thx,

    ------------------------------
    ____________________
    Laszlo
    ------------------------------



  • 6.  RE: User Attribute mismatch

    Posted Wed September 16, 2020 05:05 PM
    They will disappear from console if you remove all snapshots containing these attributes definitions. On Process Center also unnamed snapshots ( e.g. using AdminTask.BPMSnapshotCleanup ('[-containerAcronym YourApp -keptNumber 0]')

    ------------------------------
    Sebastian Tylko
    ------------------------------



  • 7.  RE: User Attribute mismatch

    Posted Thu September 17, 2020 02:23 AM
    Edited by Jens Engelke Thu September 17, 2020 02:28 AM

    User attribute definitions are created in the product database, when a snapshot containing this attribute definition is created or imported.
    The definition when ALL snapshots (named or unnamed) containing this definition are removed.

    Duplicates can be complex as the same user attribute definition name might be used in different contexts. Consider two process apps (1) "HR bonus" and (2) "credit scoring", they might both define an attribute "rating". It is a number of (1) and a String (as in "AA+") for (2). 

    Imagine you define rating as a String and store values like "1+" for some employees. You now decide to switch to a strict numbering scheme, but there is already data that does not fit into that scheme.

    While "duplicates" are typically consolidated, there are cases where attributes with the same name appear multiple times in Process Admin Console.
    At the time of creation in Process Designer, a "user attribute definition id" is associated with that attribute. As long as you keep using this exact definition (e.g. by creating it in a shared toolkit), there should be just one in Process Admin Console. When you create another user attribute definition with the same name in a different toolkit or process app, you have two. 
    JS APIs should be smart enough to find the one in "the current context", that is when a process app queries the value for BranchCode, an attribute defined in this process app will win. If it is not defined in the process app, all referenced toolkits should be searched.


    ------------------------------
    Jens Engelke
    ------------------------------