Class BonitaWork

java.lang.Object
org.bonitasoft.engine.work.BonitaWork
Direct Known Subclasses:
TenantAwareBonitaWork

public abstract class BonitaWork extends Object
Author:
Baptiste Mesta
  • Field Details

    • tenantId

      protected long tenantId
  • Constructor Details

    • BonitaWork

      public BonitaWork()
  • Method Details

    • getUuid

      public String getUuid()
    • getDescription

      public abstract String getDescription()
    • getRecoveryProcedure

      public String getRecoveryProcedure()
      Returns:
      how to restart the work if it fails
    • work

      public abstract CompletableFuture<Void> work(Map<String,Object> context) throws Exception
      Execution code of the work
      Parameters:
      context - a map of context that can be filled by a work to be given to a wrapped work
      Throws:
      Exception
    • handleFailure

      public abstract void handleFailure(Throwable e, Map<String,Object> context) throws Exception
      Throws:
      Exception
    • canBeRecoveredByTheRecoveryMechanism

      public boolean canBeRecoveredByTheRecoveryMechanism()
      Returns:
      true if the RecoveryService can recover this kind of failure
    • setParent

      public void setParent(BonitaWork parentWork)
    • getParent

      public BonitaWork getParent()
    • getRootWork

      protected BonitaWork getRootWork()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object