コード例 #1
0
ファイル: BpmnShapeImpl.cs プロジェクト: zf321/ESS.FW.Bpm
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IBpmnShape>(/*typeof(IBpmnShape),*/ BpmnModelConstants.BpmndiElementBpmnShape)
                                                   .NamespaceUri(BpmnModelConstants.BpmndiNs)
                                                   .ExtendsType(typeof(ILabeledShape))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            BpmnElementAttribute = typeBuilder
                                   .StringAttribute(BpmnModelConstants.BpmndiAttributeBpmnElement)
                                   .QNameAttributeReference <IBaseElement>(/*typeof(IBaseElement)*/)
                                   .Build();

            IsHorizontalAttribute = typeBuilder.BooleanAttribute(BpmnModelConstants.BpmndiAttributeIsHorizontal).Build();

            IsExpandedAttribute = typeBuilder.BooleanAttribute(BpmnModelConstants.BpmndiAttributeIsExpanded).Build();

            IsMarkerVisibleAttribute = typeBuilder.BooleanAttribute(BpmnModelConstants.BpmndiAttributeIsMarkerVisible).Build();

            IsMessageVisibleAttribute = typeBuilder.BooleanAttribute(BpmnModelConstants.BpmndiAttributeIsMessageVisible).Build();

            ParticipantBandKindAttribute = typeBuilder.EnumAttribute <ParticipantBandKind>(BpmnModelConstants.BpmndiAttributeParticipantBandKind /*, typeof(ParticipantBandKind)*/).Build();

            ChoreographyActivityShapeAttribute = typeBuilder
                                                 .StringAttribute(BpmnModelConstants.BpmndiAttributeChoreographyActivityShape)
                                                 .QNameAttributeReference <IBpmnShape>(/*typeof(IBpmnShape)*/)
                                                 .Build();

            ISequenceBuilder sequenceBuilder = typeBuilder.Sequence();

            BpmnLabelChild = sequenceBuilder.Element <IBpmnLabel>(/*typeof(IBpmnLabel)*/).Build/*<IBpmnLabel>*/ ();

            typeBuilder.Build();
        }
コード例 #2
0
ファイル: BpmnEdgeImpl.cs プロジェクト: zf321/ESS.FW.Bpm
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IBpmnEdge>(/*typeof(IBpmnEdge),*/ BpmnModelConstants.BpmndiElementBpmnEdge)
                                                   .NamespaceUri(BpmnModelConstants.BpmndiNs)
                                                   .ExtendsType(typeof(ILabeledEdge))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            BpmnElementAttribute = typeBuilder
                                   .StringAttribute(BpmnModelConstants.BpmndiAttributeBpmnElement)
                                   .QNameAttributeReference <IBaseElement>(/*typeof(IBaseElement)*/)
                                   .Build();

            SourceElementAttribute = typeBuilder
                                     .StringAttribute(BpmnModelConstants.BpmndiAttributeSourceElement)
                                     .QNameAttributeReference <IDiagramElement>(/*typeof(IDiagramElement)*/)
                                     .Build();

            TargetElementAttribute = typeBuilder
                                     .StringAttribute(BpmnModelConstants.BpmndiAttributeTargetElement)
                                     .QNameAttributeReference <IDiagramElement>(/*typeof(IDiagramElement)*/)
                                     .Build();

            MessageVisibleKindAttribute = typeBuilder.EnumAttribute <MessageVisibleKind>(BpmnModelConstants.BpmndiAttributeMessageVisibleKind /*, typeof(MessageVisibleKind)*/).Build();

            ISequenceBuilder sequenceBuilder = typeBuilder.Sequence();

            BpmnLabelChild = sequenceBuilder.Element <IBpmnLabel>(/*typeof(IBpmnLabel)*/).Build/*<IBpmnLabel>*/ ();

            typeBuilder.Build();
        }
コード例 #3
0
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IEventBasedGateway>(/*typeof(IEventBasedGateway),*/ BpmnModelConstants.BpmnElementEventBasedGateway)
                                                   .NamespaceUri(BpmnModelConstants.Bpmn20Ns)
                                                   .ExtendsType(typeof(IGateway))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            InstantiateAttribute = typeBuilder.BooleanAttribute(BpmnModelConstants.BpmnAttributeInstantiate).DefaultValue(false).Build();

            EventGatewayTypeAttribute = typeBuilder.EnumAttribute <EventBasedGatewayType>(BpmnModelConstants.BpmnAttributeEventGatewayType /*, typeof(EventBasedGatewayType)*/).DefaultValue(EventBasedGatewayType.Exclusive).Build();

            typeBuilder.Build();
        }
コード例 #4
0
ファイル: GatewayImpl.cs プロジェクト: zf321/ESS.FW.Bpm
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IGateway>(/*typeof(IGateway),*/ BpmnModelConstants.BpmnElementGateway)
                                                   .NamespaceUri(BpmnModelConstants.Bpmn20Ns)
                                                   .ExtendsType(typeof(IFlowNode))
                                                   .AbstractType();

            GatewayDirectionAttribute = typeBuilder.EnumAttribute <GatewayDirection>(BpmnModelConstants.BpmnAttributeGatewayDirection /*, typeof(GatewayDirection)*/)
                                        .DefaultValue(GatewayDirection.Unspecified)
                                        .Build();

            typeBuilder.Build();
        }
コード例 #5
0
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IItemDefinition>(/*typeof(IItemDefinition),*/ BpmnModelConstants.BpmnElementItemDefinition)
                                                   .NamespaceUri(BpmnModelConstants.Bpmn20Ns)
                                                   .ExtendsType(typeof(IRootElement))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            StructureRefAttribute = typeBuilder.StringAttribute(BpmnModelConstants.BpmnAttributeStructureRef).Build();

            IsCollectionAttribute = typeBuilder.BooleanAttribute(BpmnModelConstants.BpmnAttributeIsCollection).DefaultValue(false).Build();

            ItemKindAttribute = typeBuilder.EnumAttribute <ItemKind>(BpmnModelConstants.BpmnAttributeItemKind /*, typeof(ItemKind)*/)
                                .DefaultValue(ItemKind.Information)
                                .Build();

            typeBuilder.Build();
        }
コード例 #6
0
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IRelationship>(/*typeof(IRelationship),*/ BpmnModelConstants.BpmnElementRelationship)
                                                   .NamespaceUri(BpmnModelConstants.Bpmn20Ns)
                                                   .ExtendsType(typeof(IBaseElement))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            TypeAttribute = typeBuilder.StringAttribute(BpmnModelConstants.BpmnAttributeType).Required().Build();

            DirectionAttribute = typeBuilder.EnumAttribute <RelationshipDirection>(BpmnModelConstants.BpmnAttributeDirection /*, typeof(RelationshipDirection)*/).Build();

            ISequenceBuilder sequenceBuilder = typeBuilder.Sequence();

            SourceCollection = sequenceBuilder.ElementCollection <Source>(/*typeof(Source)*/).MinOccurs(1).Build/*<Source>*/ ();

            TargetCollection = sequenceBuilder.ElementCollection <Target>(/*typeof(Target)*/).MinOccurs(1).Build/*<Target>*/ ();

            typeBuilder.Build();
        }
コード例 #7
0
ファイル: AssociationImpl.cs プロジェクト: zf321/ESS.FW.Bpm
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IAssociation>(/*typeof(IAssociation),*/ BpmnModelConstants.BpmnElementAssociation)
                                                   .NamespaceUri(BpmnModelConstants.Bpmn20Ns)
                                                   .ExtendsType(typeof(IArtifact))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            //SourceRefAttribute = (IAttributeReference<IBaseElement>)typeBuilder.StringAttribute(BpmnModelConstants.BpmnAttributeSourceRef)
            //    .Required()
            //    .QNameAttributeReference<IBaseElement>(typeof(IBaseElement))
            //    .Build();

            SourceRefAttribute = typeBuilder
                                 .StringAttribute(BpmnModelConstants.BpmnAttributeSourceRef)
                                 .Required()
                                 .QNameAttributeReference <IBaseElement>(/*typeof(IBaseElement)*/)
                                 .Build();

            //TargetRefAttribute = (IAttributeReference<IBaseElement>)typeBuilder.StringAttribute(BpmnModelConstants.BpmnAttributeTargetRef)
            //    .Required()
            //    .QNameAttributeReference<IBaseElement>(typeof(IBaseElement))
            //    .Build();

            TargetRefAttribute = typeBuilder
                                 .StringAttribute(BpmnModelConstants.BpmnAttributeTargetRef)
                                 .Required()
                                 .QNameAttributeReference <IBaseElement>(/*typeof(IBaseElement)*/)
                                 .Build();

            AssociationDirectionAttribute = typeBuilder
                                            .EnumAttribute <AssociationDirection>(BpmnModelConstants.BpmnAttributeAssociationDirection /*, typeof(AssociationDirection)*/)
                                            .DefaultValue(AssociationDirection.None)
                                            .Build();

            typeBuilder.Build();
        }
コード例 #8
0
ファイル: ProcessImpl.cs プロジェクト: zf321/ESS.FW.Bpm
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IProcess>(/*typeof(IProcess),*/ BpmnModelConstants.BpmnElementProcess)
                                                   .NamespaceUri(BpmnModelConstants.Bpmn20Ns)
                                                   .ExtendsType(typeof(ICallableElement))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            ProcessTypeAttribute = typeBuilder
                                   .EnumAttribute <ProcessType>(BpmnModelConstants.BpmnAttributeProcessType /*, typeof(ProcessType)*/)
                                   .DefaultValue(ProcessType.None)
                                   .Build();

            IsClosedAttribute = typeBuilder
                                .BooleanAttribute(BpmnModelConstants.BpmnAttributeIsClosed)
                                .DefaultValue(false)
                                .Build();

            IsExecutableAttribute = typeBuilder
                                    .BooleanAttribute(BpmnModelConstants.BpmnAttributeIsExecutable)
                                    .Build();

            // TODO: definitionalCollaborationRef

            ISequenceBuilder sequenceBuilder = typeBuilder.Sequence();

            AuditingChild = sequenceBuilder
                            .Element <IAuditing>(/*typeof(IAuditing)*/)
                            .Build/*<IAuditing>*/ ();

            MonitoringChild = sequenceBuilder
                              .Element <IMonitoring>(/*typeof(IMonitoring)*/)
                              .Build/*<IMonitoring>*/ ();

            PropertyCollection = sequenceBuilder
                                 .ElementCollection <IProperty>(/*typeof(IProperty)*/)
                                 .Build/*<IProperty>*/ ();

            LaneSetCollection = sequenceBuilder
                                .ElementCollection <ILaneSet>(/*typeof(ILaneSet)*/)
                                .Build/*<ILaneSet>*/ ();

            FlowElementCollection = sequenceBuilder
                                    .ElementCollection <IFlowElement>(/*typeof(IFlowElement)*/)
                                    .Build/*<IFlowElement>*/ ();

            ArtifactCollection = sequenceBuilder
                                 .ElementCollection <IArtifact>(/*typeof(IArtifact)*/)
                                 .Build/*<IArtifact>*/ ();

            ResourceRoleCollection = sequenceBuilder
                                     .ElementCollection <IResourceRole>(/*typeof(IResourceRole)*/)
                                     .Build/*<IResourceRole>*/ ();

            CorrelationSubscriptionCollection = sequenceBuilder
                                                .ElementCollection <ICorrelationSubscription>(/*typeof(ICorrelationSubscription)*/)
                                                .Build/*<ICorrelationSubscription>*/ ();

            SupportsCollection = sequenceBuilder.ElementCollection <Supports>(/*typeof(Supports)*/)
                                 .QNameElementReferenceCollection <IProcess>(/*typeof(IProcess)*/)
                                 .Build();

            CamundaCandidateStarterGroupsAttribute = typeBuilder
                                                     .StringAttribute(BpmnModelConstants.CamundaAttributeCandidateStarterGroups)
                                                     .Namespace(BpmnModelConstants.CamundaNs)
                                                     .Build();

            CamundaCandidateStarterUsersAttribute = typeBuilder
                                                    .StringAttribute(BpmnModelConstants.CamundaAttributeCandidateStarterUsers)
                                                    .Namespace(BpmnModelConstants.CamundaNs)
                                                    .Build();

            CamundaJobPriorityAttribute = typeBuilder
                                          .StringAttribute(BpmnModelConstants.CamundaAttributeJobPriority)
                                          .Namespace(BpmnModelConstants.CamundaNs)
                                          .Build();

            CamundaTaskPriorityAttribute = typeBuilder
                                           .StringAttribute(BpmnModelConstants.CamundaAttributeTaskPriority)
                                           .Namespace(BpmnModelConstants.CamundaNs)
                                           .Build();

            CamundaHistoryTimeToLiveAttribute = typeBuilder
                                                .StringAttribute(BpmnModelConstants.CamundaAttributeHistoryTimeToLive)
                                                .Namespace(BpmnModelConstants.CamundaNs)
                                                .Build();

            typeBuilder.Build();
        }
コード例 #9
0
        public new static void RegisterType(ModelBuilder modelBuilder)
        {
            IModelElementTypeBuilder typeBuilder = modelBuilder.DefineType <IMultiInstanceLoopCharacteristics>(/*typeof(IMultiInstanceLoopCharacteristics),*/ BpmnModelConstants.BpmnElementMultiInstanceLoopCharacteristics)
                                                   .NamespaceUri(BpmnModelConstants.Bpmn20Ns)
                                                   .ExtendsType(typeof(ILoopCharacteristics))
                                                   .InstanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass());

            IsSequentialAttribute = typeBuilder
                                    .BooleanAttribute(BpmnModelConstants.BpmnElementIsSequential)
                                    .DefaultValue(false)
                                    .Build();

            BehaviorAttribute = typeBuilder
                                .EnumAttribute <MultiInstanceFlowCondition>(BpmnModelConstants.BpmnElementBehavior /*, typeof(MultiInstanceFlowCondition)*/)
                                .DefaultValue(MultiInstanceFlowCondition.All)
                                .Build();

            OneBehaviorEventRefAttribute = typeBuilder
                                           .StringAttribute(BpmnModelConstants.BpmnElementOneBehaviorEventRef)
                                           .QNameAttributeReference <IEventDefinition>(/*typeof(IEventDefinition)*/)
                                           .Build();

            NoneBehaviorEventRefAttribute = typeBuilder
                                            .StringAttribute(BpmnModelConstants.BpmnElementNoneBehaviorEventRef)
                                            .QNameAttributeReference <IEventDefinition>(/*typeof(IEventDefinition)*/)
                                            .Build();

            ISequenceBuilder sequenceBuilder = typeBuilder.Sequence();

            LoopCardinalityChild = sequenceBuilder
                                   .Element <ILoopCardinality>(/*typeof(ILoopCardinality)*/)
                                   .Build/*<ILoopCardinality>*/ ();

            LoopDataInputRefChild = sequenceBuilder
                                    .Element <LoopDataInputRef>(/*typeof(LoopDataInputRef)*/)
                                    .QNameElementReference <IDataInput>(/*typeof(IDataInput)*/)
                                    .Build();

            LoopDataOutputRefChild = sequenceBuilder
                                     .Element <LoopDataOutputRef>(/*typeof(LoopDataOutputRef)*/)
                                     .QNameElementReference <IDataOutput>(/*typeof(IDataOutput)*/)
                                     .Build();

            OutputDataItemChild = sequenceBuilder
                                  .Element <IOutputDataItem>(/*typeof(IOutputDataItem)*/)
                                  .Build/*<IOutputDataItem>*/ ();

            InputDataItemChild = sequenceBuilder
                                 .Element <INputDataItem>(/*typeof(INputDataItem)*/)
                                 .Build/*<INputDataItem>*/ ();

            ComplexBehaviorDefinitionCollection = sequenceBuilder
                                                  .ElementCollection <IComplexBehaviorDefinition>(/*typeof(IComplexBehaviorDefinition)*/)
                                                  .Build/*<IComplexBehaviorDefinition>*/ ();

            CompletionConditionChild = sequenceBuilder
                                       .Element <ICompletionCondition>(/*typeof(ICompletionCondition)*/)
                                       .Build/*<ICompletionCondition>*/ ();

            camundaAsyncAfter = typeBuilder
                                .BooleanAttribute(BpmnModelConstants.CamundaAttributeAsyncAfter)
                                .Namespace(BpmnModelConstants.CamundaNs).DefaultValue(false)
                                .Build();

            camundaAsyncBefore = typeBuilder
                                 .BooleanAttribute(BpmnModelConstants.CamundaAttributeAsyncBefore)
                                 .Namespace(BpmnModelConstants.CamundaNs)
                                 .DefaultValue(false)
                                 .Build();

            camundaExclusive = typeBuilder
                               .BooleanAttribute(BpmnModelConstants.CamundaAttributeExclusive)
                               .Namespace(BpmnModelConstants.CamundaNs)
                               .DefaultValue(true)
                               .Build();

            camundaCollection = typeBuilder
                                .StringAttribute(BpmnModelConstants.CamundaAttributeCollection)
                                .Namespace(BpmnModelConstants.CamundaNs)
                                .Build();

            camundaElementVariable = typeBuilder
                                     .StringAttribute(BpmnModelConstants.CamundaAttributeElementVariable)
                                     .Namespace(BpmnModelConstants.CamundaNs)
                                     .Build();

            typeBuilder.Build();
        }