How can I pass service DelegateTask object into service (via expression)?
We tried use expression in modeler with
#{sentMessageService.sendingMessage(task)}
but we got an error
Message: Unknown property used in expression: #{sentMessageService.sendingMessage(task)}. Cause: Cannot resolve identifier 'task'
but this expression we successfully used on user task.. is there different behavior?
Best regards
Jiri Sojka
public class MyServiceTask implements JavaDelegate {
public void execute(DelegateExecution execution) throws Exception {
execution.getProcessEngineServices()
.getTaskService()
.createTaskQuery()
.processInstanceId(execution.getProcessInstanceId())
.taskDefinitionKey("approveInvoice")
.singleResult();
}
}thanks a lot for your tips... We try to use camunda plugin in grails, but we are beginner with this framework... Our idea is have some easily tested code (in grails) and use it in camunda.
We need just get a process variable (in service task), then we are able to get our grails domain object (but it should be groovy class).
So the main question is if we can use groovy class and use it like standard java class which implements JavaDelegate...
Thanks a lot again.
Beste regards
Jiri Sojka
--You received this message because you are subscribed to the Google Groups "camunda BPM users" group.To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.To post to this group, send email to camunda-...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/66f5d133-6e89-494a-b345-9a4af903bbf0%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.
we have our grails domain objects and each has own process instance. We want to create service/class and use it in service task... But into this task we need pass some object and use it for find our grails object..
I created standard groovy class(implements JavaDelegate). It works for me. From delegate i am able to get business key(it contains our grails domain object id) and find grails domain object...
Is there any better solution?
Thanks a lot.
Jiri.
--You received this message because you are subscribed to the Google Groups "camunda BPM users" group.To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/75ce0482-1246-44d7-ae56-be1b88bf9a2f%40googlegroups.com.