Exactly, you need to mix and match your process variables with your facts so the right facts are evaluated:
WorkflowProcessInstance( $orderId: variables[“orderId”])
Order( tasksComplete == true, id == $orderId )
Reply to this message by going to Community
Start a new discussion in jBPM at Community