About the SubprocessTask node in BPMN Workflow (problem with placeholder)

Hello,

I’m accomplishing the SubprocessTask node in my Workflow Designer and there is a problem I can’t really figure out how to do.

In my designer, there is a BoundaryEvent node that attachment the edge of Task node, like this:

And there is EventDefine could drag into the BoundaryEvent,like this:

So the UserTask is a group and the BoundaryEvent is group too. the BoundaryEvent as a member add in the UserTask that without placeholder. so I can calculate BoundaryEvent 's position on edge of the UserTask.

I have SubprocessTask node that contain a placeholder and any node could drag into it, like this:

But I can’t accomplish BoundaryEvent on edge of the SubprocessTask, because the node as member of the SubprocessTask couldn’t beyond its edge and must in the area of placeholder.

I want do something about BoundaryEvent with SubprocessTask like UserTask, and the SubprocessTask has its own abilities. What should I do?

Thank you in advance for your help.

I’m not familiar with BPMN nor what code you have used and modified for your app.

However, I would think you would want to implement the double-circle attachment on a UserTask as something that was part of that UserTask Node, not a separate Node or Group. However you implemented the UserTask Node, you could surround those panels with another panel, a “Spot” Panel, so that you could position a Panel holding a double-circle Shape where you want it relative to the rest of the UserTask node.

That Panel would have a mouseDrop event handler to accept drops. (Also implement mouseDragEnter and mouseDragLeave event handlers to provide feedback to the user so that they know whether a drop would be permitted there.) A successful drop would set a flag or add to an Array in the model data (I don’t know if you want to support multiple items within that attachment area.) Such a property would make the clock Shape visible or not with a simple Binding, or if multiple shapes should be supported there, use a Panel.itemArray binding and a Panel.itemTemplate.

I think that would be much simpler than trying to use Groups within Groups.

Hi walter,

I considered your solution, but the node as elements of ItemArray couldn’t be selected, it contrary to my requirement, because I need select the BoundaryEvent node and display some other imformation.

So, is there any way to resolve this point?

Well, you can certainly make particular objects within a Part appear to be selectable. Consider for example the apparent selection of fields in records: http://gojs.net/latest/samples/selectableFields.html. Note how some additional programming was necessary in order for users to be able to delete selected fields. But it all works, including undo/redo.

Thanks for your reply.

I saw the sample you provide and I want to know how to obtain the parent group in click function? because I want set isSelected parameter of parent group to false when click the inside panel.

What I was suggesting assumed UserAgent was a regular Node, not a Group. But if you really need it to be a Group, that’s OK too.

Anyway, GraphObject.part will return the Part whose visual tree an object is in, including itself if it is a Part.

If you are actually asking about group containers, Part.containingGroup returns the immediately containing Group, if there is any. Part.findTopLevelPart() walks up the chain of containing groups.