public override void AssertExternalTaskResults()
        {
            ESS.FW.Bpm.Engine.Externaltask.IExternalTask externalTask = engineRule.ExternalTaskService.CreateExternalTaskQuery().First();

            Assert.AreEqual(5, (int)externalTask.Retries);
            Assert.AreEqual("error", externalTask.ErrorMessage);
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO Resources.Task: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("deprecation") protected org.Camunda.bpm.Engine.Externaltask.IExternalTask startProcessInstanceAndFailExternalTask(String tenant)
        protected internal virtual ESS.FW.Bpm.Engine.Externaltask.IExternalTask startProcessInstanceAndFailExternalTask(string tenant)
        {
            IProcessInstance pi = runtimeService.CreateProcessInstanceByKey(DefaultExternalTaskModelBuilder.DefaultProcessKey).SetProcessDefinitionTenantId(tenant).Execute();

            ESS.FW.Bpm.Engine.Externaltask.IExternalTask externalTask = externalTaskService.CreateExternalTaskQuery(c => c.ProcessInstanceId == pi.Id).First();
            reportExternalTaskFailure(externalTask.Id);
            return(externalTask);
        }
        public virtual void testSetJobPriority()
        {
            // given
            IProcessInstance            processInstance = engineRule.RuntimeService.StartProcessInstanceByKey("oneExternalTaskProcess");
            IList <ILockedExternalTask> tasks           = engineRule.ExternalTaskService.FetchAndLock(5, "workerId")
                                                          //.Topic("externalTaskTopic", 5000L).Execute();
                                                          as IList <ILockedExternalTask>;
            ILockedExternalTask task = tasks[0];

            // when
            authRule.Init(scenario).WithUser("userId").BindResource("ProcessInstanceId", processInstance.Id).BindResource("processDefinitionKey", "oneExternalTaskProcess").Start();

            engineRule.ExternalTaskService.Unlock(task.Id);

            // then
            if (authRule.AssertScenario(scenario))
            {
                ESS.FW.Bpm.Engine.Externaltask.IExternalTask externalTask = engineRule.ExternalTaskService.CreateExternalTaskQuery().First();
                Assert.IsNull(externalTask.LockExpirationTime);
            }
        }
Exemple #4
0
 public virtual long getProperty(ESS.FW.Bpm.Engine.Externaltask.IExternalTask obj)
 {
     return(obj.Priority);
 }
Exemple #5
0
 public virtual DateTime getProperty(ESS.FW.Bpm.Engine.Externaltask.IExternalTask obj)
 {
     return(obj.LockExpirationTime);
 }
Exemple #6
0
 public virtual string getProperty(ESS.FW.Bpm.Engine.Externaltask.IExternalTask obj)
 {
     return(obj.ProcessDefinitionKey);
 }
Exemple #7
0
 public virtual string getProperty(ESS.FW.Bpm.Engine.Externaltask.IExternalTask obj)
 {
     return(obj.ProcessInstanceId);
 }
Exemple #8
0
 protected internal virtual void startProcessInstanceFailAndCompleteExternalTask(string tenant)
 {
     ESS.FW.Bpm.Engine.Externaltask.IExternalTask task = startProcessInstanceAndFailExternalTask(tenant);
     completeExternalTask(task.Id);
 }