2 Replies Latest reply on Apr 24, 2015 12:49 PM by Josh Pritt

    How to assign a new Design Node type in WFM for a custom design

    Arun Raj Mogilineedi

      I have a custom design work flow to be configured for my project. So I have created a design new node type in PX admin tool and configured few roles/transitions for it. Now my question is to how to assign this new design node in WFM when we create a new design. It takes the default design node as of now. I want the "Create Design" to pick the new design node type which has the new work flow that I configured. I kinda understand that this has to be done with some customization and may not be achieved with configuration. Can anyone please help me with some sample code for designer customization for this task? Thanks in advance.

       

      Arun

        • Re: How to assign a new Design Node type in WFM for a custom design
          Molly Azami

          Hi Arun,

           

          Are you saying that you need two types of Design Nodes and that is why you need to create the custom one? 

          The default design node is highly customizable.  If you only need one, then I am unclear about what flow you want to create and why it would not work with the default design node.

           

          Molly

          • Re: How to assign a new Design Node type in WFM for a custom design
            Josh Pritt

            Instead of creating a whole new node type for a different workflow you could always leverage the existing design type (Process.MM_WMS_DESIGN_TYPE) to set up different workflows.  You would need to build your own custom subtask that would check the design type (MM_WMS_DESIGN.design_type_id or IMMWMSDesign.PropertySet "DESIGN_TYPE_ID").  You could then have the subtask return true for its Enabled property for the design type you want the assigned task to show up on.  So you could have an Electric type design have an extra workflow state that requires special approval from a different supervisor, etc. than a Gas type design.  All by having this subtask that checks the design type assigned to all the different tasks so that Electric designs only show one set of tasks and transition tasks vs Gas designs that would see a whole other set of tasks and transition tasks giving them two separate workflows.  You could even create another subtask that sets the design type like "Set design type" and it has a parameter called "type" that you could apply this subtask to tasks like "Create Electric Design" that would set "Electric" in the type param and another task "Create Gas Design" that would set "Gas" in the type param.  Then you could give users Px roles like "Electric designer" and "gas designer" so that gas designers can only see the "Create Gas Design" task.  So when they execute that they will create a design and it has that subtask that will set the type to "Gas".  So from then on, that design will only show the appropriate tasks and transition tasks based on its type. 

             

            Doing it this way will let you keep the default Design node type around so you can leverage all of the other existing ArcFM API like IMMWMSDesign, etc.

            Correct me if I'm wrong, but I think if you create a new, custom node type you have to implement a whole lot more custom code like a custom deleter object, custom create subtask, and create a new table in the database to hold its information (similar to MM_WMS_DESIGN).