Esempio n. 1
0
 public virtual HistoricIncidentQuery deleted()
 {
     if (incidentState != null)
     {
         throw new ProcessEngineException("Already querying for incident state <" + incidentState + ">");
     }
     incidentState = org.camunda.bpm.engine.history.IncidentState_Fields.DELETED;
     return(this);
 }
Esempio n. 2
0
        public HistoryEntry(int incidentId, int?accountId, IncidentState state)
        {
            if (incidentId <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(incidentId));
            }
            if (!Enum.IsDefined(typeof(IncidentState), state))
            {
                throw new InvalidEnumArgumentException(nameof(state), (int)state, typeof(IncidentState));
            }
            if (accountId != null && accountId <= 0)
            {
                throw new ArgumentOutOfRangeException("AccountId should either be unspecified (system account) or larger than 0.");
            }

            IncidentId    = incidentId;
            AccountId     = accountId;
            IncidentState = state;
            CreatedAtUtc  = DateTime.UtcNow;
        }
 private string MapStateToString(IncidentState? state)
 {
     if (state == null) {
         return null;
     } else if (state == IncidentState.Active) {
         return "Active";
     }
     else if (state == IncidentState.Resolved) {
         return "Resolved";
     }
     else if (state == IncidentState.Canceled) {
         return "Canceled";
     }
     return "Unknown State - " + state;
 }