code: def isTransitionAllowed(instance, transition_id):
      
      wf_tool = getToolByName(instance, "portal_workflow")
      for wf_id in wf_tool.getChainFor(instance):
          wf = wf_tool.getWorkflowById(wf_id)
          if wf and wf.isActionSupported(instance, transition_id):
              return True
  
      return False
docs: Checks if the object can perform the transition passed in.
      :returns: True if transition can be performed
      :rtype: bool