Custom action should only executed for particular DcumentType

Hi @machak and @jasper.floor,

Appreciate your help for custom action class.

Now I want to execute those custom class for particular document type.

For example if I have defined 3 document types such as “News”, “Product” & “ContactUs” then it should get executed only for “News” document type when it is published and NOT for others.

I tried to find but no luck for how we can get document type details in hipposcxml:scxml file so that based on condition my above requirement will satisfy.

Need your help!.

You may be better served by using a workflow event

Although, it depends on what you are tryng to achieve. Does it need to be done on publish? Perhaps a validator can do what you want instead. That works on save though.

Thanks for your quick reply, yes, it need to be done on publish.

Then a workflow event listener is probably better than a custom workflow action. Though it could be done on transition into publish state. You’d have to add some logic to check the type. I think it may be possible in scxml, but I’m not sure it’s worth it to figure it out. Responding to a workflow event is easier to understand and implement in this case.

Hi @jasper.floor, can you help me to get document type in hipposcxml:scxml file?, I tried to find out how we can get and check type in scxml but not able to achieve it, will be highly appreciated if you can help me!!!.

Hi all,

I need your help for above query, can anyone help me out.


I believe you can get the node being handled from the workflow context. But I don’t have a ready solution for you, I’d have to try it out myseld. I highly recommend you look into workflow event listeners instead.