Class BPMProcessVO
- Namespace
- PHCBusinessLayer
- Assembly
- PHCBusinessLayer.dll
Business Process Management Type
[AttTable("BPMProcess", 20240211)]
[AttTableProducts(new Products[] { Products.BPM })]
[AttTableFlags(new TableFlags[] { TableFlags.MasterEntity, TableFlags.TableForJorge, TableFlags.FullTextSearchable })]
[AttTableOrderBy("[BPMProcess].[name]", "[BPMProcess].[grupo]")]
[AttTableVOInfo(typeof(BPMWorkflowAttInfo))]
public class BPMProcessVO : BusinessVO, IBaseSerialization, ICloneVO, ICloneable, IChange, IParent, IGenericVO
- Inheritance
-
BPMProcessVO
Fields
CodeOnDelegate
public const string CodeOnDelegate = "OnDelegate_BPM"
Field Value
CodeOnEnd
public const string CodeOnEnd = "OnEnd_BPM"
Field Value
CodeOnInit
public const string CodeOnInit = "OnInit_BPM"
Field Value
CodeOnStatus
public const string CodeOnStatus = "OnStatus_BPM"
Field Value
Properties
GetFieldStampName
Use only field name without table name
public override string GetFieldStampName { get; }
Property Value
GetStampValue
public override string GetStampValue { get; }
Property Value
RoleVO
Instance of RoleVO, permission
[AttExternalCollection(typeof(RoleVO), new string[] { "[PF].[pfstamp]", "[BPMProcess].[pfstamp]" })]
public RoleVO RoleVO { get; }
Property Value
UserVO
Instance of UserVO, permission user
[AttExternalCollection(typeof(UserVO), new string[] { "[US].[usstamp]", "[BPMProcess].[usstamp]" })]
public UserVO UserVO { get; }
Property Value
activities
User tasks or scrips
[AttCollection(typeof(BPMActionVO))]
public List<BPMActionVO> activities { get; set; }
Property Value
bpmXml
XML with process drawing
[AttHidden]
public string bpmXml { get; set; }
Property Value
bpmprocessstamp
Unique ID
[AttLenght(25)]
public string bpmprocessstamp { get; set; }
Property Value
description
Description
[AttFieldType(AttFieldType.InputTypes.memo)]
public string description { get; set; }
Property Value
events
Events
[AttCollection(typeof(BPMEventVO))]
public List<BPMEventVO> events { get; set; }
Property Value
flows
Sequences of flows between elements
[AttCollection(typeof(BPMFlowVO))]
public List<BPMFlowVO> flows { get; set; }
Property Value
gateways
Decisions
[AttCollection(typeof(BPMGatewayVO))]
public List<BPMGatewayVO> gateways { get; set; }
Property Value
grupo
Group
[AttList]
[AttLenght(40)]
[AttMandatory]
[AttLogInfo(2)]
public string grupo { get; set; }
Property Value
identification
Identification
[AttVirtualField]
[AttHidden]
public string identification { get; set; }
Property Value
idvarname
ID variable
[AttLenght(60)]
[AttVirtualField]
public string idvarname { get; set; }
Property Value
idvarstamp
ID variable (code)
[AttForeignKey(typeof(BPMVariableVO))]
[AttLenght(25)]
public string idvarstamp { get; set; }
Property Value
inativo
Inactive
[AttList]
public bool inativo { get; set; }
Property Value
name
Name
[AttList]
[AttLenght(80)]
[AttMandatory]
[AttIndex(Unique = true)]
[AttLogInfo(1)]
public string name { get; set; }
Property Value
ndoc
Serie
[AttLenght(5)]
[AttIndex(Unique = true)]
[AttLogInfo(0)]
[AttList]
[AttMinValue(0)]
[AttMandatory]
public int ndoc { get; set; }
Property Value
ondelegate
[AttFieldType(AttFieldType.InputTypes.memo)]
[AttHidden]
public string ondelegate { get; set; }
Property Value
onend
Código ao finalizar
[AttFieldType(AttFieldType.InputTypes.memo)]
public string onend { get; set; }
Property Value
- string
Este código não tem qualquer influencia sobre o fecho e a passagem a histórico do workflow, qualquer tipo de retorno de mensagens ou erro na execução do código é ignorado, pois não é possivel cancelar o fim de um workflow, no entanto as mensagens retornadas são registradas no log do workflow.
Remarks
É o último código a correr de todo o workflow, corre depois do elemento evento de fim ter sido executado, pode usar 'SDKBPM' para facilmente aceder ao SDK do BPM e assim efetuar as operações desejadas.
Payload Se o worflow foi iniciado a partir do ecrã de clientes quando se consultava o cliente João, esses dados estão dentro do workflow através de uma variável especial e em qualquer altura da execução do workflow pode-se obter esses dados da seguinte maneira:
Dim cliente as ClVO = SDKBPM.GetPayload(Of ClVO)()
Contexto SDKBPM.GetProcess() = Tipo de workflow iniciado BPMProcessVO SDKBPM.GetWorkflow() = Workflow iniciado BPMInstanceVO SDKBPM.GetActivity() = Atividade que está a ser processada BPMActivityVO
SDKBPM.GetElement() = Elemento que deu origem á atividade BPMElement SDKBPM.GetElement(Of BPMEventVO)() SDKBPM.GetElement(Of BPMFlowVO)() SDKBPM.GetElement(Of BPMGatewayVO)() SDKBPM.GetElement(Of BPMActionVO)()
Definir valores de variáveis SDKBPM.SetVar('Cod02', 'Meu resumo inicial')
Obter valores de variáveis SDKBPM.GetVar('Cod02'), retorna Object SDKBPM.GetVar(Of String)('Cod02'), retorna String
oninit
Código ao iniciar
[AttFieldType(AttFieldType.InputTypes.memo)]
public string oninit { get; set; }
Property Value
- string
Atenção, se for retornada alguma mensagem de erro 'MsgError' ou ocorrer erro na execução do código, o workflow é cancelado, todas as mensagens retornadas são registradas no log do workflow e se o evento que iniciou o workflow
tiver momento de confirmação pelo utilizador, essas mensagens também são mostradas ao utilizador.
Remarks
É o primeiro código a correr de todo o workflow, mesmo antes de correr o 'Código ao iniciar' do evento que iniciou o workflow, é a altura ideal para definir valores para as variáveis, ou alterar outras configurações do workflow ou da atividade que está a ser processada, pode usar 'SDKBPM' para facilmente aceder ao SDK do BPM e assim efetuar as operações desejadas.
Payload Se o worflow foi iniciado a partir do ecrã de clientes quando se consultava o cliente João, esses dados estão dentro do workflow através de uma variável especial e em qualquer altura da execução do workflow pode-se obter esses dados da seguinte maneira:
Dim cliente as ClVO = SDKBPM.GetPayload(Of ClVO)()
Contexto SDKBPM.GetProcess() = Tipo de workflow iniciado BPMProcessVO SDKBPM.GetWorkflow() = Workflow iniciado BPMInstanceVO SDKBPM.GetActivity() = Atividade que está a ser processada BPMActivityVO
SDKBPM.GetElement() = Elemento que deu origem á atividade BPMElement SDKBPM.GetElement(Of BPMEventVO)() SDKBPM.GetElement(Of BPMFlowVO)() SDKBPM.GetElement(Of BPMGatewayVO)() SDKBPM.GetElement(Of BPMActionVO)()
Definir valores de variáveis SDKBPM.SetVar('Cod02', 'Meu resumo inicial')
Obter valores de variáveis SDKBPM.GetVar('Cod02'), retorna Object SDKBPM.GetVar(Of String)('Cod02'), retorna String
onlyoneactive
Only one workflow active
public bool onlyoneactive { get; set; }
Property Value
Remarks
It only allows you to create a new workflow of this type, when there is no workflow active, regardless of the record it is linked to.
onstatus
Código de estado
[AttFieldType(AttFieldType.InputTypes.memo)]
public string onstatus { get; set; }
Property Value
- string
Se for retornada alguma mensagem de erro 'MsgError' ou ocorrer erro na execução do código, a alteração do valor do estado é cancelada mas o workflow continua em execução, todas as mensagens retornadas são registradas no log do workflow.
Remarks
Quando uma atividade altera o valor do estado do workflow este código é executado automaticamente,
permitindo assim reagir a essa alteração e poder enviar mensagens ou notificações sobre o que acabou
de ocorrer ou então executar outro tipo de procedimento no workflow relacionado com a alteração do estado,
pode usar 'SDKBPM' para facilmente aceder ao SDK do BPM e assim efetuar as operações desejadas.
Payload Se o worflow foi iniciado a partir do ecrã de clientes quando se consultava o cliente João, esses dados estão dentro do workflow através de uma variável especial e em qualquer altura da execução do workflow pode-se obter esses dados da seguinte maneira:
Dim cliente as ClVO = SDKBPM.GetPayload(Of ClVO)()
Contexto SDKBPM.GetProcess() = Tipo de workflow iniciado BPMProcessVO SDKBPM.GetWorkflow() = Workflow iniciado BPMInstanceVO SDKBPM.GetActivity() = Atividade que está a ser processada BPMActivityVO
SDKBPM.GetElement() = Elemento que deu origem á atividade BPMElement SDKBPM.GetElement(Of BPMEventVO)() SDKBPM.GetElement(Of BPMFlowVO)() SDKBPM.GetElement(Of BPMGatewayVO)() SDKBPM.GetElement(Of BPMActionVO)()
Definir valores de variáveis SDKBPM.SetVar('Cod02', 'Meu resumo inicial')
Obter valores de variáveis SDKBPM.GetVar('Cod02'), retorna Object SDKBPM.GetVar(Of String)('Cod02'), retorna String
pfname
Permission name
[AttLenght(60)]
[AttVirtualField(typeof(BPMWorkflowAttInfo))]
public string pfname { get; set; }
Property Value
pfstamp
Connection to RoleVO
[AttForeignKey(typeof(RoleVO), HiddenField = false)]
[AttLenght(25)]
public string pfstamp { get; set; }
Property Value
roletype
Role type
[AttLenght(2)]
public RoleTypes roletype { get; set; }
Property Value
roletypename
Role type name
[AttLenght(60)]
[AttLocale(typeof(BPMWorkflowAttInfo), new string[] { "[BPMProcess].[roletype]" })]
public string roletypename { get; set; }
Property Value
summaryvarname
Summary variable
[AttLenght(60)]
[AttVirtualField]
public string summaryvarname { get; set; }
Property Value
summaryvarstamp
Summary variable (code)
[AttForeignKey(typeof(BPMVariableVO))]
[AttLenght(25)]
public string summaryvarstamp { get; set; }
Property Value
useattachment
Use attachments
[AttEntityAvailable(typeof(AnexosVO))]
public bool useattachment { get; set; }
Property Value
useconnection
Use connections
public bool useconnection { get; set; }
Property Value
usname
Permission user name
[AttLenght(60)]
[AttVirtualField(typeof(BPMWorkflowAttInfo))]
public string usname { get; set; }
Property Value
usstamp
Connection to UserVO, permission user
[AttForeignKey(typeof(UserVO), HiddenField = false)]
[AttLenght(25)]
public string usstamp { get; set; }
Property Value
variables
Global variables
[AttCollection(typeof(BPMVariableVO))]
public List<BPMVariableVO> variables { get; set; }
Property Value
version
Version, only increment when isdraft = false
[AttLenght(10)]
[AttFieldType(AttFieldType.InputTypes.integer, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
public decimal version { get; set; }
Property Value
Methods
GetAction(string)
public BPMActionVO GetAction(string uniqueID)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
uniqueID |
string |
Returns
GetElement(string)
public BPMElement GetElement(string uniqueID)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
uniqueID |
string |
Returns
GetElement<T>(string)
public T GetElement<T>(string uniqueID) where T : BPMElement
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
uniqueID |
string |
Returns
- T
Type Parameters
T
GetEvent(string)
public BPMEventVO GetEvent(string uniqueID)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
uniqueID |
string |
Returns
GetFlow(string)
public BPMFlowVO GetFlow(string uniqueID)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
uniqueID |
string |
Returns
GetGateway(string)
public BPMGatewayVO GetGateway(string uniqueID)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
uniqueID |
string |
Returns
SetStampValue(string)
public override void SetStampValue(string stampID)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
stampID |
string |
SignStatusChanged()
public bool SignStatusChanged()
Returns
WillSignNow()
public bool WillSignNow()
Returns
Explicit Interface Implementations
isdraft
Draft mode is the only one that allows you to enter drawing mode
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
bool isdraft { get; set; }