Visual Enterprise Generator – Non SAP Integrated Top Assembly logic
This example is for non SAP integration Assembly Processing
Depending on end deliverable requirements it can be very useful figuring out during processing when the process is working on a top level assembly vs. a sub level assembly.
For example you might want to run a poly reduce operation at the top level instead of the individual part level. You may want to add collapse logic on sub-assemblies or any other number of scene level operations
In order to do this you need to modify your assembly build process jmp_assembly_buildassembly (ideally you would save this as a new process and not overwrite the out of the box processes)
Within your process add an If operation from the Flow Control tool box and use the following condition
number(//xmlrequest/BuildAssemblyRequest/Assembly/PreProcessingInstructions/Parameter[@Name=’bomTopLevel’]/@Value)
This will either return a 0 for the sublevel assemblies or a 1 for the top level. The IF operation will use Boolean logic to determine if the current assembly being processed is the top level. (0=false 1=true)
Now you have a starting off point to add the additional operations you need under each branch of the IF statement.
I was using a smilar technique with a coworker and we found that when using a DMS assembly workflow, we need to do an " = 1" at the end of the line. This is because we need to check specifically for a 1 value. Integers evaluating to booleans will always be True if they are "not 0" so they would have always evaluated to true for every level of the hierarchy.
The bomIsTop Flag will always be 0 unless its the top level assembly so the boolean logic will work. Added clarification to which workflow this is applicable for.