Пример #1
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         #egs = ExclusiveGatewayDefinition(),
         creat=ActivityDefinition(contexts=[CreateChallenge],
                                  description=_("Create a challenge"),
                                  title=_("Create a challenge"),
                                  groups=[_('Add')]),
         creatandpublish=ActivityDefinition(
             contexts=[CrateAndPublish],
             description=_("Create a challenge"),
             title=_("Create a challenge"),
             groups=[]),
         submit=ActivityDefinition(contexts=[SubmitChallenge],
                                   description=_("Submit the challenge"),
                                   title=_("Submit for publication"),
                                   groups=[]),
         delchallenge=ActivityDefinition(
             contexts=[DelChallenge],
             description=_("Delete the challenge"),
             title=_("Delete"),
             groups=[]),
         edit=ActivityDefinition(contexts=[EditChallenge],
                                 description=_("Edit the challenge"),
                                 title=_("Edit"),
                                 groups=[]),
         archive=ActivityDefinition(contexts=[ArchiveChallenge],
                                    description=_("Archive the challenge"),
                                    title=_("Archive"),
                                    groups=[]),
         publish=ActivityDefinition(contexts=[PublishChallenge],
                                    description=_("Publish the challenge"),
                                    title=_("Publish"),
                                    groups=[]),
         present=ActivityDefinition(
             contexts=[PresentChallenge, PresentChallengeAnonymous],
             description=_("Share the challenge with others"),
             title=_("Share"),
             groups=[]),
         comment=ActivityDefinition(
             contexts=[CommentChallenge, CommentChallengeAnonymous],
             description=_("Comment the challenge"),
             title=_("Comment"),
             groups=[]),
         associate=ActivityDefinition(
             contexts=[Associate],
             description=_("Associate the challenge"),
             title=_("Associate"),
             groups=[]),
         see=ActivityDefinition(contexts=[SeeChallenge],
                                description=_("Details"),
                                title=_("Details"),
                                groups=[]),
         seechallenges=ActivityDefinition(contexts=[SeeChallenges],
                                          description=_("The challenges"),
                                          title=_("The challenges"),
                                          groups=[_('See')]),
         add_members=ActivityDefinition(contexts=[AddMembers],
                                        description=_("Add Participants"),
                                        title=_("Add Participants"),
                                        groups=[]),
         remove_members=ActivityDefinition(
             contexts=[RemoveMembers],
             description=_("Remove Participants"),
             title=_("Remove Participants"),
             groups=[]),
         see_members=ActivityDefinition(contexts=[SeeMembers],
                                        description=_("See Participants"),
                                        title=_("See Participants"),
                                        groups=[]),
         pg=ParallelGatewayDefinition(),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'creat'),
         TransitionDefinition('pg', 'creatandpublish'),
         TransitionDefinition('pg', 'submit'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('pg', 'publish'),
         TransitionDefinition('pg', 'delchallenge'),
         TransitionDefinition('pg', 'comment'),
         TransitionDefinition('pg', 'present'),
         TransitionDefinition('pg', 'associate'),
         TransitionDefinition('pg', 'see'),
         TransitionDefinition('pg', 'seechallenges'),
         TransitionDefinition('pg', 'archive'),
         TransitionDefinition('pg', 'add_members'),
         TransitionDefinition('pg', 'remove_members'),
         TransitionDefinition('pg', 'see_members'),
         TransitionDefinition('creat', 'eg'),
         TransitionDefinition('creatandpublish', 'eg'),
         TransitionDefinition('submit', 'eg'),
         TransitionDefinition('publish', 'eg'),
         TransitionDefinition('delchallenge', 'eg'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('comment', 'eg'),
         TransitionDefinition('present', 'eg'),
         TransitionDefinition('associate', 'eg'),
         TransitionDefinition('see', 'eg'),
         TransitionDefinition('seechallenges', 'eg'),
         TransitionDefinition('archive', 'eg'),
         TransitionDefinition('add_members', 'eg'),
         TransitionDefinition('remove_members', 'eg'),
         TransitionDefinition('see_members', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #2
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         add_customeraccount=ActivityDefinition(
             contexts=[AddCustomerAccount],
             description=_("Add a customer account"),
             title=_("Add a customer account"),
             groups=[]),
         edit_customeraccount=ActivityDefinition(
             contexts=[EditCustomerAccount],
             description=_("Configure the customer account"),
             title=_("Configure"),
             groups=[]),
         login=ActivityDefinition(contexts=[LogIn],
                                  description=_("Log in"),
                                  title=_("Log in"),
                                  groups=[_("Access")]),
         logout=ActivityDefinition(contexts=[LogOut],
                                   description=_("Log out"),
                                   title=_("Log out"),
                                   groups=[_("Access")]),
         edit=ActivityDefinition(contexts=[Edit],
                                 description=_("Edit"),
                                 title=_("Edit"),
                                 groups=[]),
         assign_roles=ActivityDefinition(
             contexts=[AssignRoles],
             description=_("Assign roles to user"),
             title=_("Assign roles"),
             groups=[]),
         deactivate=ActivityDefinition(
             contexts=[Deactivate],
             description=_("Deactivate the member"),
             title=_("Deactivate the member"),
             groups=[]),
         activate=ActivityDefinition(contexts=[Activate],
                                     description=_("Activate the profile"),
                                     title=_("Activate the profile"),
                                     groups=[]),
         see=ActivityDefinition(contexts=[SeePerson],
                                description=_("Details"),
                                title=_("Details"),
                                groups=[]),
         see_customeraccount=ActivityDefinition(
             contexts=[SeeCustomerAccount],
             description=_("Details"),
             title=_("Details"),
             groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'login'),
         TransitionDefinition('pg', 'logout'),
         TransitionDefinition('login', 'eg'),
         TransitionDefinition('logout', 'eg'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('pg', 'assign_roles'),
         TransitionDefinition('assign_roles', 'eg'),
         TransitionDefinition('pg', 'deactivate'),
         TransitionDefinition('deactivate', 'eg'),
         TransitionDefinition('pg', 'activate'),
         TransitionDefinition('activate', 'eg'),
         TransitionDefinition('pg', 'see'),
         TransitionDefinition('see', 'eg'),
         TransitionDefinition('pg', 'add_customeraccount'),
         TransitionDefinition('add_customeraccount', 'eg'),
         TransitionDefinition('pg', 'edit_customeraccount'),
         TransitionDefinition('edit_customeraccount', 'eg'),
         TransitionDefinition('pg', 'see_customeraccount'),
         TransitionDefinition('see_customeraccount', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #3
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         creat=ActivityDefinition(contexts=[CreateNewsletter],
                                  description=_("Create a newsletter"),
                                  title=_("Create a newsletter"),
                                  groups=[_('Add')]),
         edit=ActivityDefinition(contexts=[EditNewsletter],
                                 description=_("Edit the newsletter"),
                                 title=_("Edit"),
                                 groups=[]),
         configure_rec=ActivityDefinition(
             contexts=[ConfigureRecNewsletter],
             description=_("Configure the recurrence"),
             title=_("Configure the recurrence"),
             groups=[]),
         redact=ActivityDefinition(contexts=[RedactNewsletter],
                                   description=_("Redact the newsletter"),
                                   title=_("Redact"),
                                   groups=[]),
         send=ActivityDefinition(contexts=[SendNewsletter],
                                 description=_("Send the newsletter"),
                                 title=_("Send"),
                                 groups=[]),
         remove=ActivityDefinition(contexts=[RemoveNewsletter],
                                   description=_("Remove the newsletter"),
                                   title=_("Remove"),
                                   groups=[]),
         subscribe=ActivityDefinition(contexts=[SubscribeNewsletter],
                                      description=_("Subscribe"),
                                      title=_("Newsletters"),
                                      groups=[]),
         unsubscribe=ActivityDefinition(
             contexts=[UserUnsubscribeNewsletter],
             description=_("Unsubscribe"),
             title=_("Unsubscribe"),
             groups=[]),
         unsubscribes=ActivityDefinition(contexts=[UnsubscribeNewsletter],
                                         description=_("Unsubscribe"),
                                         title=_("Unsubscribe"),
                                         groups=[]),
         see=ActivityDefinition(contexts=[SeeNewsletter],
                                description=_("See the newsletter"),
                                title=_("See"),
                                groups=[]),
         seesubscribed=ActivityDefinition(
             contexts=[SeeSubscribed],
             description=_("See subscribed users"),
             title=_("Subscribed users"),
             groups=[]),
         see_all=ActivityDefinition(contexts=[SeeNewsletters],
                                    description=_("See newsletters"),
                                    title=_("Newsletters"),
                                    groups=[_('See')]),
         see_content_history=ActivityDefinition(
             contexts=[SeeNewsletterHistory],
             description=_("See content history"),
             title=_("Content history"),
             groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'creat'),
         TransitionDefinition('creat', 'eg'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('pg', 'configure_rec'),
         TransitionDefinition('configure_rec', 'eg'),
         TransitionDefinition('pg', 'redact'),
         TransitionDefinition('redact', 'eg'),
         TransitionDefinition('pg', 'send'),
         TransitionDefinition('send', 'eg'),
         TransitionDefinition('pg', 'remove'),
         TransitionDefinition('remove', 'eg'),
         TransitionDefinition('pg', 'subscribe'),
         TransitionDefinition('subscribe', 'eg'),
         TransitionDefinition('pg', 'unsubscribe'),
         TransitionDefinition('unsubscribe', 'eg'),
         TransitionDefinition('pg', 'unsubscribes'),
         TransitionDefinition('unsubscribes', 'eg'),
         TransitionDefinition('pg', 'see'),
         TransitionDefinition('see', 'eg'),
         TransitionDefinition('pg', 'see_all'),
         TransitionDefinition('see_all', 'eg'),
         TransitionDefinition('pg', 'seesubscribed'),
         TransitionDefinition('seesubscribed', 'eg'),
         TransitionDefinition('pg', 'see_content_history'),
         TransitionDefinition('see_content_history', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #4
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         registration=ActivityDefinition(contexts=[Registration],
                                         description=_("User registration"),
                                         title=_("User registration"),
                                         groups=[]),
         confirmregistration=ActivityDefinition(
             contexts=[ConfirmRegistration],
             description=_("Confirm registration"),
             title=_("Confirm registration"),
             groups=[]),
         remind=ActivityDefinition(contexts=[Remind],
                                   description=_("Remind user"),
                                   title=_("Remind"),
                                   groups=[]),
         see_registration=ActivityDefinition(contexts=[SeeRegistration],
                                             description=_("Details"),
                                             title=_("Details"),
                                             groups=[]),
         see_registrations=ActivityDefinition(
             contexts=[SeeRegistrations],
             description=_("See registrations"),
             title=_("Registrations"),
             groups=[_('See')]),
         remove=ActivityDefinition(contexts=[RemoveRegistration],
                                   description=_("Remove the registration"),
                                   title=_("Remove"),
                                   groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'registration'),
         TransitionDefinition('registration', 'eg'),
         TransitionDefinition('pg', 'confirmregistration'),
         TransitionDefinition('confirmregistration', 'eg'),
         TransitionDefinition('pg', 'remind'),
         TransitionDefinition('remind', 'eg'),
         TransitionDefinition('pg', 'see_registration'),
         TransitionDefinition('see_registration', 'eg'),
         TransitionDefinition('pg', 'see_registrations'),
         TransitionDefinition('see_registrations', 'eg'),
         TransitionDefinition('pg', 'remove'),
         TransitionDefinition('remove', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #5
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         add_group=ActivityDefinition(contexts=[AddGroup],
                                      description=_("Add a group"),
                                      title=_("Add a group"),
                                      groups=[_('More')]),
         remove_group=ActivityDefinition(contexts=[RemoveGroup],
                                         description=_("Remove the group"),
                                         title=_("Remove"),
                                         groups=[]),
         edit_group=ActivityDefinition(contexts=[EditGroup],
                                       description=_("Edit the group"),
                                       title=_("Edit the group"),
                                       groups=[]),
         manage_groups=ActivityDefinition(contexts=[ManageGroup],
                                          description=_("Manage groups"),
                                          title=_("Manage groups"),
                                          groups=[]),
         see_group=ActivityDefinition(contexts=[SeeGroup],
                                      description=_("Details"),
                                      title=_("Details"),
                                      groups=[]),
         private_group=ActivityDefinition(contexts=[PrivateGroup],
                                          description=_("Private"),
                                          title=_("Private"),
                                          groups=[]),
         publish_group=ActivityDefinition(contexts=[PublishGroup],
                                          description=_("Publish"),
                                          title=_("Publish"),
                                          groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'see_group'),
         TransitionDefinition('see_group', 'eg'),
         TransitionDefinition('pg', 'add_group'),
         TransitionDefinition('pg', 'remove_group'),
         TransitionDefinition('pg', 'edit_group'),
         TransitionDefinition('add_group', 'eg'),
         TransitionDefinition('edit_group', 'eg'),
         TransitionDefinition('remove_group', 'eg'),
         TransitionDefinition('pg', 'manage_groups'),
         TransitionDefinition('manage_groups', 'eg'),
         TransitionDefinition('pg', 'private_group'),
         TransitionDefinition('pg', 'publish_group'),
         TransitionDefinition('private_group', 'eg'),
         TransitionDefinition('publish_group', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #6
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         #First loop
         pgblock1=ParallelGatewayDefinition(),
         pgblock1sync=ParallelGatewayDefinition(),
         egblock1=ExclusiveGatewayDefinition(),
         archiveculturalevent=ActivityDefinition(
             contexts=[ArchiveCulturalEvent],
             description=_("Archive cultural events"),
             title=_("Archive cultural events"),
             groups=[]),
         send_newsletters=ActivityDefinition(
             contexts=[SendNewsletters],
             description=_("Send newsletters"),
             title=_("Send newsletters"),
             groups=[]),
         alert_users=ActivityDefinition(contexts=[AlertUsers],
                                        description=_("Alert users"),
                                        title=_("Alert users"),
                                        groups=[]),
         timerblock1=IntermediateCatchEventDefinition(
             TimerEventDefinition(time_date=calculate_next_date_block1)),
         #Second loop
         pgblock2=ParallelGatewayDefinition(),
         pgblock2sync=ParallelGatewayDefinition(),
         egblock2=ExclusiveGatewayDefinition(),
         synchronizepublishsettings=ActivityDefinition(
             contexts=[SynchronizePublishSettings],
             description=_("Synchronize publish settings"),
             title=_("Synchronize publish settings"),
             groups=[]),
         timerblock2=IntermediateCatchEventDefinition(
             TimerEventDefinition(time_date=calculate_next_date_block2)),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         #First loop
         TransitionDefinition('pg', 'egblock1'),
         TransitionDefinition('egblock1', 'pgblock1'),
         TransitionDefinition('pgblock1', 'archiveculturalevent'),
         TransitionDefinition('archiveculturalevent', 'pgblock1sync'),
         TransitionDefinition('pgblock1', 'send_newsletters'),
         TransitionDefinition('send_newsletters', 'pgblock1sync'),
         TransitionDefinition('pgblock1', 'alert_users'),
         TransitionDefinition('alert_users', 'pgblock1sync'),
         TransitionDefinition('pgblock1sync', 'timerblock1'),
         TransitionDefinition('timerblock1', 'egblock1'),
         #Second loop
         TransitionDefinition('pg', 'egblock2'),
         TransitionDefinition('egblock2', 'pgblock2'),
         TransitionDefinition('pgblock2', 'synchronizepublishsettings'),
         TransitionDefinition('synchronizepublishsettings', 'pgblock2sync'),
         TransitionDefinition('pgblock2sync', 'timerblock2'),
         TransitionDefinition('timerblock2', 'egblock2'),
     )
Пример #7
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         #egs = ExclusiveGatewayDefinition(),
         creat=ActivityDefinition(contexts=[CreateIdea],
                                  description=_("Create an idea"),
                                  title=_("Create an idea"),
                                  groups=[_('Add')]),
         creatandpublish=ActivityDefinition(contexts=[CrateAndPublish],
                                            description=_("Create an idea"),
                                            title=_("Create an idea"),
                                            groups=[]),
         creatandpublishasproposal=ActivityDefinition(
             contexts=[CrateAndPublishAsProposal],
             description=_("Create a Working Group"),
             title=_("Create a Working Group"),
             groups=[]),
         duplicate=ActivityDefinition(contexts=[DuplicateIdea],
                                      description=_("Duplicate this idea"),
                                      title=_("Duplicate"),
                                      groups=[]),
         delidea=ActivityDefinition(contexts=[DelIdea],
                                    description=_("Delete the idea"),
                                    title=_("Delete"),
                                    groups=[]),
         edit=ActivityDefinition(contexts=[EditIdea],
                                 description=_("Edit the idea"),
                                 title=_("Edit"),
                                 groups=[]),
         submit=ActivityDefinition(contexts=[SubmitIdea],
                                   description=_("Submit the idea"),
                                   title=_("Submit for publication"),
                                   groups=[]),
         submit_max=ActivityDefinition(contexts=[SubmitIdeaMax],
                                       description=_("Submit the idea"),
                                       title=_("Submit for publication"),
                                       groups=[]),
         archive=ActivityDefinition(contexts=[ArchiveIdea],
                                    description=_("Archive the idea"),
                                    title=_("Archive"),
                                    groups=[]),
         publish=ActivityDefinition(contexts=[PublishIdea],
                                    description=_("Publish the idea"),
                                    title=_("Publish"),
                                    groups=[]),
         recuperate=ActivityDefinition(contexts=[RecuperateIdea],
                                       description=_("Restore the idea"),
                                       title=_("Restore"),
                                       groups=[]),
         abandon=ActivityDefinition(contexts=[AbandonIdea],
                                    description=_("Archive the idea"),
                                    title=_("Archive"),
                                    groups=[]),
         present=ActivityDefinition(
             contexts=[PresentIdea, PresentIdeaAnonymous],
             description=_("Share the idea with others"),
             title=_("Share"),
             groups=[]),
         comment=ActivityDefinition(
             contexts=[CommentIdea, CommentIdeaAnonymous],
             description=_("Comment the idea"),
             title=_("Comment"),
             groups=[]),
         associate=ActivityDefinition(contexts=[Associate],
                                      description=_("Associate the idea"),
                                      title=_("Associate"),
                                      groups=[]),
         see=ActivityDefinition(contexts=[SeeIdea],
                                description=_("Details"),
                                title=_("Details"),
                                groups=[]),
         compare=ActivityDefinition(contexts=[CompareIdea],
                                    description=_("Compare versions"),
                                    title=_("Compare"),
                                    groups=[]),
         support=ActivityDefinition(contexts=[SupportIdea],
                                    description=_("Support the idea"),
                                    title=_("Support"),
                                    groups=[]),
         oppose=ActivityDefinition(contexts=[OpposeIdea],
                                   description=_("Oppose the idea"),
                                   title=_("Oppose"),
                                   groups=[]),
         withdraw_token=ActivityDefinition(
             contexts=[WithdrawToken],
             description=_("Withdraw token from idea"),
             title=_("Withdraw my token"),
             groups=[]),
         makeitsopinion=ActivityDefinition(
             contexts=[MakeOpinion],
             description=_("Give one's opinion"),
             title=_("Give one's opinion"),
             groups=[]),
         seeworkinggroups=ActivityDefinition(
             contexts=[SeeRelatedWorkingGroups],
             description=_("See the related working groups"),
             title=_("The working groups"),
             groups=[]),
         pg=ParallelGatewayDefinition(),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'creat'),
         TransitionDefinition('pg', 'creatandpublish'),
         TransitionDefinition('pg', 'seeworkinggroups'),
         TransitionDefinition('pg', 'creatandpublishasproposal'),
         TransitionDefinition('pg', 'duplicate'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('pg', 'publish'),
         TransitionDefinition('pg', 'delidea'),
         TransitionDefinition('pg', 'abandon'),
         TransitionDefinition('pg', 'recuperate'),
         TransitionDefinition('pg', 'comment'),
         TransitionDefinition('pg', 'present'),
         TransitionDefinition('pg', 'associate'),
         TransitionDefinition('pg', 'see'),
         TransitionDefinition('pg', 'compare'),
         TransitionDefinition('pg', 'submit'),
         TransitionDefinition('pg', 'submit_max'),
         TransitionDefinition('pg', 'archive'),
         TransitionDefinition('pg', 'makeitsopinion'),
         TransitionDefinition('makeitsopinion', 'eg'),
         TransitionDefinition('pg', 'support'),
         TransitionDefinition('support', 'eg'),
         TransitionDefinition('pg', 'oppose'),
         TransitionDefinition('oppose', 'eg'),
         TransitionDefinition('pg', 'withdraw_token'),
         TransitionDefinition('withdraw_token', 'eg'),
         TransitionDefinition('creat', 'eg'),
         TransitionDefinition('creatandpublish', 'eg'),
         TransitionDefinition('creatandpublishasproposal', 'eg'),
         TransitionDefinition('duplicate', 'eg'),
         TransitionDefinition('recuperate', 'eg'),
         TransitionDefinition('abandon', 'eg'),
         TransitionDefinition('publish', 'eg'),
         TransitionDefinition('delidea', 'eg'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('comment', 'eg'),
         TransitionDefinition('present', 'eg'),
         TransitionDefinition('associate', 'eg'),
         TransitionDefinition('see', 'eg'),
         TransitionDefinition('compare', 'eg'),
         TransitionDefinition('submit', 'eg'),
         TransitionDefinition('submit_max', 'eg'),
         TransitionDefinition('archive', 'eg'),
         TransitionDefinition('seeworkinggroups', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #8
0
    def _process_valid_subprocess(self):
        """
        S: start event
        E: end event
        G1,3(x): XOR Gateway
        P2,4(+): Parallel Gateway
        Y, Z: activities
        SP: sub-process                -----
                                    -->| SP|------------\
                                   /   -----             \
    -----   ---------   --------- /                       \   ---------   -----
    | S |-->| G1(x) |-->| P2(+) |-                         -->| P4(+) |-->| E |
    -----   --------- \ --------- \    ---------   -----   /  ---------   -----
                       \           \-->| G3(x) |-->| Y |--/
                        \              /--------   -----
                         \    -----   /
                          \-->| Z |--/
                              -----
        SS: start event
        SE: end event
        G(X): XOR Gateway
        SA, SB, SC: activities
                                     -----   -----
                                  -->| SB|-->| SE|
        -----   -----   -------- /   -----   -/---
  SP:   | SS|-->| SA|-->| G(X) |-    -----   /
        -----   -----   -------- \-->| SC|--/
                                     -----
        """
        sp = ProcessDefinition(**{'id':u'sub_process'})
        sp.isSubProcess = True
        self.app['sub_process'] = sp
        sp.defineNodes(
                ss = StartEventDefinition(),
                sa = ActivityDefinition(),
                sg = ExclusiveGatewayDefinition(),
                sb = ActivityDefinition(),
                sc = ActivityDefinition(),
                se = EndEventDefinition(),
        )
        sp.defineTransitions(
                TransitionDefinition('ss', 'sa'),
                TransitionDefinition('sa', 'sg'),
                TransitionDefinition('sg', 'sb'),
                TransitionDefinition('sg', 'sc'),
                TransitionDefinition('sb', 'se'),
                TransitionDefinition('sc', 'se'),
        )
        pd = ProcessDefinition(**{'id':u'sample'})
        self.app['sample'] = pd
        spaction = SubProcessDefinition(pd=sp)
        pd.defineNodes(
                s = StartEventDefinition(),
                sp = spaction,
                y = ActivityDefinition(),
                z = ActivityDefinition(),
                g1 = ExclusiveGatewayDefinition(),
                g2 = ParallelGatewayDefinition(),
                g3 = ExclusiveGatewayDefinition(),
                g4 = ParallelGatewayDefinition(),
                e = EndEventDefinition(),
        )
        pd.defineTransitions(
                TransitionDefinition('s', 'g1'),
                TransitionDefinition('g1', 'g2'),
                TransitionDefinition('g1', 'z'),
                TransitionDefinition('g2', 'sp'),
                TransitionDefinition('g2', 'g3'),
                TransitionDefinition('z', 'g3'),
                TransitionDefinition('g3', 'y'),
                TransitionDefinition('y', 'g4'),
                TransitionDefinition('sp', 'g4'),
                TransitionDefinition('g4', 'e'),
        )

        self.config.scan(example)
        return spaction, sp, pd
Пример #9
0
 def _init_definition(self):
     self.defineNodes(
             start = StartEventDefinition(),
             pg = ParallelGatewayDefinition(),
             search = ActivityDefinition(contexts=[Search],
                                    description=_("Search"),
                                    title=_("Search"),
                                    groups=[]),
             home = ActivityDefinition(contexts=[SeeHome],
                                    description=_("Home"),
                                    title=_("Home"),
                                    groups=[]),
             mycontents = ActivityDefinition(contexts=[SeeMyContents],
                                    description=_("See my contents"),
                                    title=_("My contents"),
                                    groups=[_('See')]),
             seecontenttomoderate = ActivityDefinition(contexts=[SeeContentsToModerate],
                                    description=_("See content to moderate"),
                                    title=_("Contents to moderate"),
                                    groups=[_('See')]),
             seegames = ActivityDefinition(contexts=[SeeGames],
                                    description=_("See games"),
                                    title=_("Games & Competitions"),
                                    groups=[_('See')]),
             seehistory = ActivityDefinition(contexts=[SeeEntityHistory],
                                    description=_("See history"),
                                    title=_("History"),
                                    groups=[]),
             seecontributors = ActivityDefinition(contexts=[SeeContributors],
                                    description=_("See contributors"),
                                    title=_("Contributors"),
                                    groups=[]),
             contact = ActivityDefinition(contexts=[Contact],
                                    description=_("Contact"),
                                    title=_("Contact"),
                                    groups=[]),
             diff_view = ActivityDefinition(contexts=[DiffView],
                                    description=_("Differences"),
                                    title=_("Differences"),
                                    groups=[]),
             see_all_dup = ActivityDefinition(contexts=[SeeAllDuplicates],
                                    description=_("All duplicates"),
                                    title=_("All duplicates"),
                                    groups=[_('See')]),
             seealerts = ActivityDefinition(contexts=[SeeAlerts],
                                    description=_("See alerts"),
                                    title=_("Alerts"),
                                    groups=[]),
             questionnaire = ActivityDefinition(contexts=[Questionnaire],
                                    description=_("Questionnaire"),
                                    title=_("Let us have your feedback"),
                                    groups=[]),
             improve = ActivityDefinition(contexts=[Improve],
                                    description=_("Questionnaire"),
                                    title=_("Let us have your feedback"),
                                    groups=[]),
             
             eg = ExclusiveGatewayDefinition(),
             end = EndEventDefinition(),
     )
     self.defineTransitions(
             TransitionDefinition('start', 'pg'),
             TransitionDefinition('pg', 'search'),
             TransitionDefinition('search', 'eg'),
             TransitionDefinition('pg', 'home'),
             TransitionDefinition('home', 'eg'),
             TransitionDefinition('pg', 'mycontents'),
             TransitionDefinition('mycontents', 'eg'),
             TransitionDefinition('pg', 'seecontributors'),
             TransitionDefinition('seecontributors', 'eg'),
             TransitionDefinition('pg', 'seecontenttomoderate'),
             TransitionDefinition('seecontenttomoderate', 'eg'),
             TransitionDefinition('pg', 'seegames'),
             TransitionDefinition('seegames', 'eg'),
             TransitionDefinition('pg', 'contact'),
             TransitionDefinition('contact', 'eg'),
             TransitionDefinition('pg', 'seehistory'),
             TransitionDefinition('seehistory', 'eg'),
             TransitionDefinition('pg', 'diff_view'),
             TransitionDefinition('diff_view', 'eg'),
             TransitionDefinition('pg', 'see_all_dup'),
             TransitionDefinition('see_all_dup', 'eg'),
             TransitionDefinition('pg', 'seealerts'),
             TransitionDefinition('seealerts', 'eg'),
             TransitionDefinition('pg', 'questionnaire'),
             TransitionDefinition('questionnaire', 'eg'),
             TransitionDefinition('pg', 'improve'),
             TransitionDefinition('improve', 'eg'),
             TransitionDefinition('eg', 'end'),
     )
Пример #10
0
 def _init_definition(self):
     self.defineNodes(
             start = StartEventDefinition(),
             pg = ParallelGatewayDefinition(),
             add_smart_folder = ActivityDefinition(contexts=[AddSmartFolder],
                                    description=_("Add a smart folder"),
                                    title=_("Add a smart folder"),
                                    groups=[_("Add")]),
             addsub_smart_folder = ActivityDefinition(contexts=[AddSubSmartFolder],
                                    description=_("Add a sub smart folder"),
                                    title=_("Add a sub smart folder"),
                                    groups=[]),
             edit_smart_folder = ActivityDefinition(contexts=[EditSmartFolder],
                                    description=_("Edit the smart folder"),
                                    title=_("Edit"),
                                    groups=[]),
             remove_smart_folder = ActivityDefinition(contexts=[RemoveSmartFolder],
                                    description=_("Remove the smart folder"),
                                    title=_("Remove"),
                                    groups=[]),
             see_smart_folder = ActivityDefinition(contexts=[SeeSmartFolder],
                                    description=_("See a smart folder"),
                                    title=_("See a smart folder"),
                                    groups=[]),
             publish_smart_folder = ActivityDefinition(contexts=[PublishSmartFolder],
                                    description=_("Publish the smart folder"),
                                    title=_("Publish"),
                                    groups=[]),
             withdraw_smart_folder = ActivityDefinition(contexts=[WithdrawSmartFolder],
                                    description=_("Withdraw the smart folder"),
                                    title=_("Withdraw the smart folder"),
                                    groups=[]),
             add_site_folder = ActivityDefinition(contexts=[AddSiteFolder],
                                    description=_("Add a site folder"),
                                    title=_("Add a site folder"),
                                    groups=[_("Add")]),
             edit_site_folder = ActivityDefinition(contexts=[EditSiteFolder],
                                    description=_("Edit the site folder"),
                                    title=_("Edit"),
                                    groups=[]),
             configure_site_folder = ActivityDefinition(contexts=[ConfigureSiteFolder],
                                    description=_("Configure the site folder"),
                                    title=_("Configure"),
                                    groups=[]),
             see_site_folder = ActivityDefinition(contexts=[SeeSiteFolder],
                                    description=_("See a site folder"),
                                    title=_("See a site folder"),
                                    groups=[]),
             remove_site_folder = ActivityDefinition(contexts=[RemoveSiteFolder],
                                    description=_("Remove the site folder"),
                                    title=_("Remove"),
                                    groups=[]),
             see_site_folders = ActivityDefinition(contexts=[SeeSiteFolders],
                                    description=_("Site folders"),
                                    title=_("Site folders"),
                                    groups=[_('See')]),
             see_smart_folders = ActivityDefinition(contexts=[SeeSmartFolders],
                                    description=_("Smart folders"),
                                    title=_("Smart folders"),
                                    groups=[_('See')]),
             fix_access_params = ActivityDefinition(contexts=[FixAccessPerimeter],
                                    description=_("Change the access perimeter"),
                                    title=_("Change the access perimeter"),
                                    groups=[]),
             order_smart_folders = ActivityDefinition(contexts=[OrderSmartFolders],
                                    description=_("Order"),
                                    title=_("Order"),
                                    groups=[]),
             order_sub_smart_folders = ActivityDefinition(contexts=[OrderSubSmartFolders],
                                    description=_("Order"),
                                    title=_("Order"),
                                    groups=[]),
             extract = ActivityDefinition(contexts=[Extract],
                                    description=_("Extract"),
                                    title=_("Extract"),
                                    groups=[_('More')]),
             managekeywords = ActivityDefinition(contexts=[ManageKeywords],
                                    description=_("Manage keywords"),
                                    title=_("Manage keywords"),
                                    groups=[_('More')]),
             eg = ExclusiveGatewayDefinition(),
             end = EndEventDefinition(),
     )
     self.defineTransitions(
             TransitionDefinition('start', 'pg'),
             TransitionDefinition('pg', 'add_smart_folder'),
             TransitionDefinition('add_smart_folder', 'eg'),
             TransitionDefinition('pg', 'publish_smart_folder'),
             TransitionDefinition('publish_smart_folder', 'eg'),
             TransitionDefinition('pg', 'withdraw_smart_folder'),
             TransitionDefinition('withdraw_smart_folder', 'eg'),
             TransitionDefinition('pg', 'addsub_smart_folder'),
             TransitionDefinition('addsub_smart_folder', 'eg'),
             TransitionDefinition('pg', 'edit_smart_folder'),
             TransitionDefinition('edit_smart_folder', 'eg'),
             TransitionDefinition('pg', 'remove_smart_folder'),
             TransitionDefinition('remove_smart_folder', 'eg'),
             TransitionDefinition('pg', 'see_smart_folder'),
             TransitionDefinition('see_smart_folder', 'eg'),
             TransitionDefinition('pg', 'add_site_folder'),
             TransitionDefinition('add_site_folder', 'eg'),
             TransitionDefinition('pg', 'edit_site_folder'),
             TransitionDefinition('edit_site_folder', 'eg'),
             TransitionDefinition('pg', 'configure_site_folder'),
             TransitionDefinition('configure_site_folder', 'eg'),
             TransitionDefinition('pg', 'see_site_folder'),
             TransitionDefinition('see_site_folder', 'eg'),
             TransitionDefinition('pg', 'remove_site_folder'),
             TransitionDefinition('remove_site_folder', 'eg'),
             TransitionDefinition('pg', 'see_site_folders'),
             TransitionDefinition('see_site_folders', 'eg'),
             TransitionDefinition('pg', 'see_smart_folders'),
             TransitionDefinition('see_smart_folders', 'eg'),
             TransitionDefinition('pg', 'fix_access_params'),
             TransitionDefinition('fix_access_params', 'eg'),
             TransitionDefinition('pg', 'order_smart_folders'),
             TransitionDefinition('order_smart_folders', 'eg'),
             TransitionDefinition('pg', 'order_sub_smart_folders'),
             TransitionDefinition('order_sub_smart_folders', 'eg'),
             TransitionDefinition('pg', 'extract'),
             TransitionDefinition('extract', 'eg'),
             TransitionDefinition('pg', 'managekeywords'),
             TransitionDefinition('managekeywords', 'eg'),
             TransitionDefinition('eg', 'end'),
     )
Пример #11
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         report=ActivityDefinition(contexts=[Report],
                                   description=_("Report the content"),
                                   title=_("Report"),
                                   groups=[]),
         see_reports=ActivityDefinition(
             contexts=[SeeReports],
             description=_("See reported contents"),
             title=_("Reported contents"),
             groups=[]),
         ignore=ActivityDefinition(contexts=[Ignore],
                                   description=_("Ignore reports"),
                                   title=_("Ignore reports"),
                                   groups=[]),
         censor=ActivityDefinition(contexts=[Censor],
                                   description=_("Censor the content"),
                                   title=_("Censor the content"),
                                   groups=[]),
         restor=ActivityDefinition(contexts=[Restor],
                                   description=_("Restore the content"),
                                   title=_("Restore the content"),
                                   groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'report'),
         TransitionDefinition('report', 'eg'),
         TransitionDefinition('pg', 'see_reports'),
         TransitionDefinition('see_reports', 'eg'),
         TransitionDefinition('pg', 'ignore'),
         TransitionDefinition('ignore', 'eg'),
         TransitionDefinition('pg', 'censor'),
         TransitionDefinition('censor', 'eg'),
         TransitionDefinition('pg', 'restor'),
         TransitionDefinition('restor', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #12
0
 def _init_definition(self):
     self.defineNodes(
             start = StartEventDefinition(),
             pg = ParallelGatewayDefinition(),
             add = ActivityDefinition(contexts=[AddOrganizations],
                                    description=_("Upload organizations from xl file"),
                                    title=_("Upload organizations"),
                                    groups=[_('More')]),
             remove = ActivityDefinition(contexts=[RemoveOrganization],
                                    description=_("Remove the organization"),
                                    title=_("Remove"),
                                    groups=[]),
             creat = ActivityDefinition(contexts=[CreatOrganizations],
                                    description=_("Creat organizations"),
                                    title=_("Creat organizations"),
                                    groups=[_('More')]),
             edits = ActivityDefinition(contexts=[EditOrganizations],
                                    description=_("Edit organizations"),
                                    title=_("Edit organizations"),
                                    groups=[_('Edit')]),
             sees = ActivityDefinition(contexts=[SeeOrganizations],
                                    description=_("See organizations"),
                                    title=_("Organizations"),
                                    groups=[_('See')]),
             edit = ActivityDefinition(contexts=[EditOrganization],
                                    description=_("Edit organization"),
                                    title=_("Edit organizations"),
                                    groups=[_('Edit')]),
             see = ActivityDefinition(contexts=[SeeOrganization],
                                    description=_("See organization"),
                                    title=_("Details"),
                                    groups=[]),
             eg = ExclusiveGatewayDefinition(),
             end = EndEventDefinition(),
     )
     self.defineTransitions(
             TransitionDefinition('start', 'pg'),
             TransitionDefinition('pg', 'add'),
             TransitionDefinition('pg', 'creat'),
             TransitionDefinition('pg', 'see'),
             TransitionDefinition('pg', 'edit'),
             TransitionDefinition('add', 'eg'),
             TransitionDefinition('pg', 'edits'),
             TransitionDefinition('edits', 'eg'),
             TransitionDefinition('pg', 'sees'),
             TransitionDefinition('sees', 'eg'),
             TransitionDefinition('creat', 'eg'),
             TransitionDefinition('edit', 'eg'),
             TransitionDefinition('see', 'eg'),
             TransitionDefinition('pg', 'remove'),
             TransitionDefinition('remove', 'eg'),
             TransitionDefinition('eg', 'end'),
     )
Пример #13
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         #egs = ExclusiveGatewayDefinition(),
         creat=ActivityDefinition(contexts=[AskQuestion],
                                  description=_("Ask a question"),
                                  title=_("Ask a question"),
                                  groups=[_('Add')]),
         delquestion=ActivityDefinition(
             contexts=[DelQuestion],
             description=_("Delete the question"),
             title=_("Delete"),
             groups=[]),
         edit=ActivityDefinition(contexts=[EditQuestion],
                                 description=_("Edit the question"),
                                 title=_("Edit"),
                                 groups=[]),
         archive=ActivityDefinition(contexts=[ArchiveQuestion],
                                    description=_("Archive the question"),
                                    title=_("Archive"),
                                    groups=[]),
         present=ActivityDefinition(
             contexts=[PresentQuestion, PresentQuestionAnonymous],
             description=_("Share the question with others"),
             title=_("Share"),
             groups=[]),
         comment=ActivityDefinition(
             contexts=[CommentQuestion, CommentQuestionAnonymous],
             description=_("Comment the question"),
             title=_("Comment"),
             groups=[]),
         answer=ActivityDefinition(
             contexts=[AnswerQuestion, AnswerQuestionAnonymous],
             description=_("Answer the question"),
             title=_("Answer"),
             groups=[]),
         associate=ActivityDefinition(
             contexts=[Associate],
             description=_("Associate the question"),
             title=_("Associate"),
             groups=[]),
         see=ActivityDefinition(contexts=[SeeQuestion],
                                description=_("Details"),
                                title=_("Details"),
                                groups=[]),
         support=ActivityDefinition(
             contexts=[SupportQuestion, SupportQuestionAnonymous],
             description=_("This question is useful"),
             title=_("This question is useful"),
             groups=[]),
         oppose=ActivityDefinition(
             contexts=[OpposeQuestion, OpposeQuestionAnonymous],
             description=_("This question is not useful"),
             title=_("This question is not useful"),
             groups=[]),
         withdraw_token=ActivityDefinition(
             contexts=[WithdrawToken],
             description=_("Withdraw my opinion"),
             title=_("Withdraw my opinion"),
             groups=[]),
         close=ActivityDefinition(contexts=[Close],
                                  description=_("Close the question"),
                                  title=_("Close"),
                                  groups=[]),
         pg=ParallelGatewayDefinition(),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'creat'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('pg', 'delquestion'),
         TransitionDefinition('pg', 'comment'),
         TransitionDefinition('pg', 'answer'),
         TransitionDefinition('pg', 'present'),
         TransitionDefinition('pg', 'associate'),
         TransitionDefinition('pg', 'see'),
         TransitionDefinition('pg', 'archive'),
         TransitionDefinition('pg', 'support'),
         TransitionDefinition('pg', 'close'),
         TransitionDefinition('support', 'eg'),
         TransitionDefinition('pg', 'oppose'),
         TransitionDefinition('oppose', 'eg'),
         TransitionDefinition('pg', 'withdraw_token'),
         TransitionDefinition('withdraw_token', 'eg'),
         TransitionDefinition('creat', 'eg'),
         TransitionDefinition('delquestion', 'eg'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('comment', 'eg'),
         TransitionDefinition('answer', 'eg'),
         TransitionDefinition('present', 'eg'),
         TransitionDefinition('associate', 'eg'),
         TransitionDefinition('see', 'eg'),
         TransitionDefinition('archive', 'eg'),
         TransitionDefinition('close', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #14
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         #egs = ExclusiveGatewayDefinition(),
         delanswer=ActivityDefinition(contexts=[DelAnswer],
                                      description=_("Delete the answer"),
                                      title=_("Delete"),
                                      groups=[]),
         edit=ActivityDefinition(contexts=[EditAnswer],
                                 description=_("Edit the answer"),
                                 title=_("Edit"),
                                 groups=[]),
         archive=ActivityDefinition(contexts=[ArchiveAnswer],
                                    description=_("Archive the answer"),
                                    title=_("Archive"),
                                    groups=[]),
         present=ActivityDefinition(
             contexts=[PresentAnswer, PresentAnswerAnonymous],
             description=_("Share the answer with others"),
             title=_("Share"),
             groups=[]),
         comment=ActivityDefinition(
             contexts=[CommentAnswer, CommentAnswerAnonymous],
             description=_("Comment the answer"),
             title=_("Comment"),
             groups=[]),
         associate=ActivityDefinition(contexts=[AssociateAnswer],
                                      description=_("Associate the answer"),
                                      title=_("Associate"),
                                      groups=[]),
         see=ActivityDefinition(contexts=[SeeAnswer],
                                description=_("Details"),
                                title=_("Details"),
                                groups=[]),
         support=ActivityDefinition(
             contexts=[SupportAnswer, SupportAnswerAnonymous],
             description=_("This answer is useful"),
             title=_("This answer is useful"),
             groups=[]),
         oppose=ActivityDefinition(
             contexts=[OpposeAnswer, OpposeAnswerAnonymous],
             description=_("This answer is not useful"),
             title=_("This answer is not useful"),
             groups=[]),
         withdraw_token=ActivityDefinition(
             contexts=[WithdrawTokenAnswer],
             description=_("Withdraw my opinion"),
             title=_("Withdraw my opinion"),
             groups=[]),
         validate=ActivityDefinition(contexts=[ValidateAnswer],
                                     description=_("Validate th answer"),
                                     title=_("Validate"),
                                     groups=[]),
         transformtoidea=ActivityDefinition(
             contexts=[TransformToIdea],
             description=_("Transform the answer into an idea"),
             title=_("Transform into an idea"),
             groups=[]),
         pg=ParallelGatewayDefinition(),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('pg', 'delanswer'),
         TransitionDefinition('pg', 'comment'),
         TransitionDefinition('pg', 'present'),
         TransitionDefinition('pg', 'associate'),
         TransitionDefinition('pg', 'see'),
         TransitionDefinition('pg', 'archive'),
         TransitionDefinition('pg', 'support'),
         TransitionDefinition('pg', 'validate'),
         TransitionDefinition('pg', 'transformtoidea'),
         TransitionDefinition('support', 'eg'),
         TransitionDefinition('pg', 'oppose'),
         TransitionDefinition('oppose', 'eg'),
         TransitionDefinition('pg', 'withdraw_token'),
         TransitionDefinition('withdraw_token', 'eg'),
         TransitionDefinition('delanswer', 'eg'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('comment', 'eg'),
         TransitionDefinition('present', 'eg'),
         TransitionDefinition('associate', 'eg'),
         TransitionDefinition('see', 'eg'),
         TransitionDefinition('archive', 'eg'),
         TransitionDefinition('validate', 'eg'),
         TransitionDefinition('transformtoidea', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #15
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         eg=ExclusiveGatewayDefinition(),
         pg=ParallelGatewayDefinition(),
         creat=ActivityDefinition(contexts=[CreateProposal],
                                  description=_("Create a new proposal"),
                                  title=_("Create a proposal"),
                                  groups=[_('Add')]),
         delete=ActivityDefinition(contexts=[DeleteProposal],
                                   description=_("Delete the proposal"),
                                   title=_("Delete"),
                                   groups=[]),
         publishasproposal=ActivityDefinition(
             contexts=[PublishAsProposal],
             description=_("Transform the idea into a proposal"),
             title=_('Create a Working Group'),
             groups=[]),
         duplicate=ActivityDefinition(
             contexts=[DuplicateProposal],
             description=_("Duplicate this proposal"),
             title=_("Duplicate"),
             groups=[]),
         publish=ActivityDefinition(contexts=[PublishProposal],
                                    description=_("Publish the proposal"),
                                    title=_("Publish"),
                                    groups=[]),
         submit=ActivityDefinition(
             contexts=[SubmitProposalModeration],
             description=_("Submit the Proposal to the Moderation"),
             title=_("Submit"),
             groups=[]),
         publish_moderation=ActivityDefinition(
             contexts=[PublishProposalModeration],
             description=_("Publish the proposal"),
             title=_("Publish"),
             groups=[]),
         archive_moderation=ActivityDefinition(
             contexts=[ArchiveProposalModeration],
             description=_("Archive the proposal"),
             title=_("Archive"),
             groups=[]),
         edit=ActivityDefinition(contexts=[EditProposal],
                                 description=_("Edit the proposal"),
                                 title=_("Edit"),
                                 groups=[]),
         participate=ActivityDefinition(contexts=[Participate],
                                        description=_("Participate"),
                                        title=_("Participate"),
                                        groups=[]),
         resign=ActivityDefinition(contexts=[Resign],
                                   description=_("Quit"),
                                   title=_("Quit"),
                                   groups=[]),
         withdraw=ActivityDefinition(
             contexts=[Withdraw],
             description=_("Withdraw from the wating list"),
             title=_("Withdraw"),
             groups=[]),
         support=ActivityDefinition(contexts=[SupportProposal],
                                    description=_("Support the proposal"),
                                    title=_("Support"),
                                    groups=[]),
         makeitsopinion=ActivityDefinition(
             contexts=[MakeOpinion],
             description=_("Give one's opinion"),
             title=_("Give one's opinion"),
             groups=[]),
         oppose=ActivityDefinition(contexts=[OpposeProposal],
                                   description=_("Oppose the proposal"),
                                   title=_("Oppose"),
                                   groups=[]),
         withdraw_token=ActivityDefinition(
             contexts=[WithdrawToken],
             description=_("Withdraw token from the proposal"),
             title=_("Withdraw my token"),
             groups=[]),
         present=ActivityDefinition(
             contexts=[PresentProposal, PresentProposalAnonymous],
             description=_("Share the proposal with others"),
             title=_("Share"),
             groups=[]),
         comment=ActivityDefinition(
             contexts=[CommentProposal, CommentProposalAnonymous],
             description=_("Comment the proposal"),
             title=_("Comment"),
             groups=[]),
         seeamendments=ActivityDefinition(contexts=[SeeAmendments],
                                          description=_("The amendments"),
                                          title=_("The amendments"),
                                          groups=[]),
         seemembers=ActivityDefinition(contexts=[SeeMembers],
                                       description=_("Members"),
                                       title=_("Members"),
                                       groups=[]),
         associate=ActivityDefinition(
             contexts=[Associate],
             description=_("Associate the proposal"),
             title=_("Associate"),
             groups=[]),
         seerelatedideas=ActivityDefinition(contexts=[SeeRelatedIdeas],
                                            description=_("Related ideas"),
                                            title=_("Related ideas"),
                                            groups=[]),
         compare=ActivityDefinition(contexts=[CompareProposal],
                                    description=_("Compare versions"),
                                    title=_("Compare"),
                                    groups=[]),
         seeproposal=ActivityDefinition(contexts=[SeeProposal],
                                        description=_("Details"),
                                        title=_("Details"),
                                        groups=[]),
         attach_files=ActivityDefinition(contexts=[AttachFiles],
                                         description=_("Attach files"),
                                         title=_("Attach files"),
                                         groups=[]),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'creat'),
         TransitionDefinition('pg', 'publishasproposal'),
         TransitionDefinition('pg', 'duplicate'),
         TransitionDefinition('pg', 'publish'),
         TransitionDefinition('pg', 'submit'),
         TransitionDefinition('pg', 'publish_moderation'),
         TransitionDefinition('pg', 'archive_moderation'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('pg', 'delete'),
         TransitionDefinition('pg', 'seerelatedideas'),
         TransitionDefinition('pg', 'comment'),
         TransitionDefinition('pg', 'compare'),
         TransitionDefinition('pg', 'seeamendments'),
         TransitionDefinition('pg', 'seemembers'),
         TransitionDefinition('pg', 'associate'),
         TransitionDefinition('pg', 'present'),
         TransitionDefinition('pg', 'resign'),
         TransitionDefinition('pg', 'participate'),
         TransitionDefinition('pg', 'withdraw'),
         TransitionDefinition('pg', 'support'),
         TransitionDefinition('pg', 'makeitsopinion'),
         TransitionDefinition('pg', 'oppose'),
         TransitionDefinition('pg', 'withdraw_token'),
         TransitionDefinition('pg', 'seeproposal'),
         TransitionDefinition('pg', 'attach_files'),
         TransitionDefinition('attach_files', 'eg'),
         TransitionDefinition('seeproposal', 'eg'),
         TransitionDefinition('creat', 'eg'),
         TransitionDefinition('publishasproposal', 'eg'),
         TransitionDefinition('duplicate', 'eg'),
         TransitionDefinition('publish', 'eg'),
         TransitionDefinition('submit', 'eg'),
         TransitionDefinition('publish_moderation', 'eg'),
         TransitionDefinition('archive_moderation', 'eg'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('delete', 'eg'),
         TransitionDefinition('seerelatedideas', 'eg'),
         TransitionDefinition('comment', 'eg'),
         TransitionDefinition('compare', 'eg'),
         TransitionDefinition('seeamendments', 'eg'),
         TransitionDefinition('seemembers', 'eg'),
         TransitionDefinition('associate', 'eg'),
         TransitionDefinition('present', 'eg'),
         TransitionDefinition('resign', 'eg'),
         TransitionDefinition('participate', 'eg'),
         TransitionDefinition('withdraw', 'eg'),
         TransitionDefinition('support', 'eg'),
         TransitionDefinition('makeitsopinion', 'eg'),
         TransitionDefinition('oppose', 'eg'),
         TransitionDefinition('withdraw_token', 'eg'),
         TransitionDefinition('eg', 'end'))
Пример #16
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         search=ActivityDefinition(contexts=[Search],
                                   description=_("Search"),
                                   title=_("Search"),
                                   groups=[]),
         home=ActivityDefinition(contexts=[SeeHome],
                                 description=_("Home"),
                                 title=_("Home"),
                                 groups=[]),
         mycontents=ActivityDefinition(contexts=[SeeMyContents],
                                       description=_("See my contents"),
                                       title=_("My contents"),
                                       groups=[]),
         myselections=ActivityDefinition(
             contexts=[SeeMySelections],
             description=_("See the items that I follow"),
             title=_("My followings"),
             groups=[]),
         myparticipations=ActivityDefinition(
             contexts=[SeeMyParticipations],
             description=_("See my participations"),
             title=_("My working groups"),
             groups=[]),
         mysupports=ActivityDefinition(contexts=[SeeMySupports],
                                       description=_("See my evaluations"),
                                       title=_("My evaluations"),
                                       groups=[]),
         seeorderedproposal=ActivityDefinition(
             contexts=[SeeOrderedProposal],
             description=_("Proposals to be examined"),
             title=_("Proposals to be examined"),
             groups=[_('See')]),
         seeproposalstomoderate=ActivityDefinition(
             contexts=[SeeProposalsToModerate],
             description=_("Proposals to be moderated"),
             title=_("Proposals to be moderated"),
             groups=[_('See')]),
         seeideastomoderate=ActivityDefinition(
             contexts=[SeeIdeasToModerate],
             description=_("Ideas to be moderated"),
             title=_("Ideas to be moderated"),
             groups=[_('See')]),
         seereportedcontents=ActivityDefinition(
             contexts=[SeeReportedContents],
             description=_("Reported contents"),
             title=_("Reported contents"),
             groups=[_('See')]),
         seeideastoexamine=ActivityDefinition(
             contexts=[SeeIdeasToExamine],
             description=_("Ideas to be examined"),
             title=_("Ideas to be examined"),
             groups=[_('See')]),
         seeusers=ActivityDefinition(contexts=[SeeUsers],
                                     description=_("Members"),
                                     title=_("Members"),
                                     groups=[_('See')]),
         seehistory=ActivityDefinition(
             contexts=[SeeEntityHistory],
             description=_("See the history of processes"),
             title=_("History of processes"),
             groups=[]),
         seealerts=ActivityDefinition(contexts=[SeeAlerts],
                                      description=_("See the alerts"),
                                      title=_("Alerts"),
                                      groups=[]),
         seegraph=ActivityDefinition(
             contexts=[SeeGraph],
             description=_("See the graph of dependencies"),
             title=_("View the graph of dependencies"),
             groups=[]),
         seedependencies=ActivityDefinition(
             contexts=[SeeDependencies],
             description=_("See the associations"),
             title=_("View associations"),
             groups=[]),
         seeanalytics=ActivityDefinition(contexts=[SeeAnalytics],
                                         description=_("See analytics"),
                                         title=_("Analytics"),
                                         groups=[_('See')]),
         seeballot=ActivityDefinition(contexts=[SeeBallot],
                                      description=_("See ballot"),
                                      title=_("Ballot"),
                                      groups=[]),
         contact=ActivityDefinition(contexts=[Contact],
                                    description=_("Contact"),
                                    title=_("Contact"),
                                    groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'search'),
         TransitionDefinition('search', 'eg'),
         TransitionDefinition('pg', 'seegraph'),
         TransitionDefinition('seegraph', 'eg'),
         TransitionDefinition('pg', 'seedependencies'),
         TransitionDefinition('seedependencies', 'eg'),
         TransitionDefinition('pg', 'home'),
         TransitionDefinition('home', 'eg'),
         TransitionDefinition('pg', 'mycontents'),
         TransitionDefinition('mycontents', 'eg'),
         TransitionDefinition('pg', 'myselections'),
         TransitionDefinition('myselections', 'eg'),
         TransitionDefinition('pg', 'myparticipations'),
         TransitionDefinition('myparticipations', 'eg'),
         TransitionDefinition('pg', 'mysupports'),
         TransitionDefinition('mysupports', 'eg'),
         TransitionDefinition('pg', 'seeorderedproposal'),
         TransitionDefinition('seeorderedproposal', 'eg'),
         TransitionDefinition('pg', 'seeideastoexamine'),
         TransitionDefinition('seeideastoexamine', 'eg'),
         TransitionDefinition('pg', 'seeusers'),
         TransitionDefinition('seeusers', 'eg'),
         TransitionDefinition('pg', 'seeideastomoderate'),
         TransitionDefinition('seeideastomoderate', 'eg'),
         TransitionDefinition('pg', 'seeproposalstomoderate'),
         TransitionDefinition('seeproposalstomoderate', 'eg'),
         TransitionDefinition('pg', 'seereportedcontents'),
         TransitionDefinition('seereportedcontents', 'eg'),
         TransitionDefinition('pg', 'seehistory'),
         TransitionDefinition('seehistory', 'eg'),
         TransitionDefinition('pg', 'contact'),
         TransitionDefinition('contact', 'eg'),
         TransitionDefinition('pg', 'seealerts'),
         TransitionDefinition('seealerts', 'eg'),
         TransitionDefinition('pg', 'seeanalytics'),
         TransitionDefinition('seeanalytics', 'eg'),
         TransitionDefinition('pg', 'seeballot'),
         TransitionDefinition('seeballot', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #17
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         eg=ExclusiveGatewayDefinition(),
         eg1=ExclusiveGatewayDefinition(),
         eg2=ExclusiveGatewayDefinition(),
         pg=ParallelGatewayDefinition(),
         votingpublication=SubProcessDefinition(
             pd='ballotprocess',
             contexts=[VotingPublication],
             description=_("Start voting for publication"),
             title=_("Start voting for publication"),
             groups=[]),
         timer_alert=IntermediateCatchEventDefinition(
             TimerEventDefinition(time_date=alert_end_cycle_duration)),
         alert_end=ActivityDefinition(
             contexts=[AlertEnd],
             description=_("Alert for the end of an improvement cycle"),
             title=_("Alert for the end of an improvement cycle"),
             groups=[]),
         work=WorkSubProcessDefinition(pd='None',
                                       contexts=[Work],
                                       description=_("Start work"),
                                       title=_("Start work"),
                                       groups=[]),
         submit=ActivityDefinition(
             contexts=[SubmitProposal],
             description=_("Submit the proposal as is"),
             title=_("Submit"),
             groups=[]),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'eg'),
         TransitionDefinition('eg', 'votingpublication', sync=True),
         TransitionDefinition('votingpublication', 'eg1'),
         TransitionDefinition('eg1', 'pg', amendable_condition, sync=True),
         TransitionDefinition('pg', 'eg2'),
         TransitionDefinition('eg2', 'timer_alert'),
         TransitionDefinition('timer_alert', 'alert_end'),
         TransitionDefinition('alert_end',
                              'eg2',
                              has_alert_condition,
                              sync=True),
         TransitionDefinition('pg', 'work'),
         TransitionDefinition('eg1', 'submit', publish_condition,
                              sync=True),
         TransitionDefinition('submit', 'end'),
         TransitionDefinition('work', 'eg'),
     )
Пример #18
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         select=ActivityDefinition(
             contexts=[SelectEntity, SelectEntityAnonymous],
             description=_("Follow"),
             title=_("Follow"),
             groups=[]),
         deselect=ActivityDefinition(contexts=[DeselectEntity],
                                     description=_("Unfollow"),
                                     title=_("Unfollow"),
                                     groups=[]),
         addreaction=ActivityDefinition(contexts=[AddReaction],
                                        description=_("Add reactions"),
                                        title=_("Add a reaction"),
                                        groups=[]),
         updatereaction=ActivityDefinition(
             contexts=[UpdateReaction],
             description=_("Update reactions"),
             title=_("Update the reaction"),
             groups=[]),
         adddeadline=ActivityDefinition(
             contexts=[AddDeadLine],
             description=_("Add the next deadline"),
             title=_("Add the next deadline"),
             groups=[_('Add')]),
         editdeadline=ActivityDefinition(
             contexts=[EditDeadLine],
             description=_("Edit the current deadline"),
             title=_("Edit the current deadline"),
             groups=[_('Edit')]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'select'),
         TransitionDefinition('select', 'eg'),
         TransitionDefinition('pg', 'addreaction'),
         TransitionDefinition('addreaction', 'eg'),
         TransitionDefinition('pg', 'updatereaction'),
         TransitionDefinition('updatereaction', 'eg'),
         TransitionDefinition('pg', 'deselect'),
         TransitionDefinition('deselect', 'eg'),
         TransitionDefinition('pg', 'adddeadline'),
         TransitionDefinition('adddeadline', 'eg'),
         TransitionDefinition('pg', 'editdeadline'),
         TransitionDefinition('editdeadline', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #19
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         create_service=ActivityDefinition(
             contexts=[
                 CreateModerationService, CreateSellingTicketsService,
                 CreateImportService, CreateExtractionService,
                 CreatePromotionService, CreateNewsletterService
             ],
             description=_("Add a moderation service"),
             title=_("Add a moderation service"),
             groups=[]),
         see_service=ActivityDefinition(contexts=[
             SeeModerationService, SeeSellingTicketsService,
             SeeImportService, SeeExtractionService, SeePromotionService,
             SeeNewsletterService, SeeModerationUnitService
         ],
                                        description=_("Details"),
                                        title=_("Details"),
                                        groups=[]),
         renew_service=ActivityDefinition(
             contexts=[
                 RenewModerationService, RenewSellingTicketsService,
                 RenewImportService, RenewExtractionService,
                 RenewPromotionService, RenewNewsletterService
             ],
             description=_("Renew the service"),
             title=_("Renew"),
             groups=[]),
         edit=ActivityDefinition(contexts=[
             EditModerationService, EditSellingTicketsService,
             EditImportService, EditExtractionService, EditPromotionService,
             EditNewsletterService
         ],
                                 description=_("Edit the service"),
                                 title=_("Edit"),
                                 groups=[]),
         remove=ActivityDefinition(contexts=[
             RemoveModerationService, RemoveSellingTicketsService,
             RemoveImportService, RemoveExtractionService,
             RemovePromotionService, RemoveNewsletterService
         ],
                                   description=_("Remove the service"),
                                   title=_("Remove"),
                                   groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'create_service'),
         TransitionDefinition('create_service', 'eg'),
         TransitionDefinition('pg', 'renew_service'),
         TransitionDefinition('renew_service', 'eg'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('pg', 'remove'),
         TransitionDefinition('remove', 'eg'),
         TransitionDefinition('pg', 'see_service'),
         TransitionDefinition('see_service', 'eg'),
         TransitionDefinition('eg', 'end'),
     )
Пример #20
0
 def _init_definition(self):
     self.defineNodes(
         start=StartEventDefinition(),
         pg=ParallelGatewayDefinition(),
         creat=ActivityDefinition(contexts=[CreateBrief],
                                  description=_("Create a news flash"),
                                  title=_("Create a news flash"),
                                  groups=[_('Add')]),
         edit=ActivityDefinition(contexts=[EditBrief],
                                 description=_("Edit the news flash"),
                                 title=_("Edit"),
                                 groups=[]),
         see=ActivityDefinition(contexts=[SeeBrief],
                                description=_("Details"),
                                title=_("Details"),
                                groups=[]),
         publish=ActivityDefinition(contexts=[PublishBrief],
                                    description=_("Publish the news flash"),
                                    title=_("Publish"),
                                    groups=[]),
         archive=ActivityDefinition(contexts=[ArchiveBrief],
                                    description=_("Archive the news flash"),
                                    title=_("Archive"),
                                    groups=[]),
         remove=ActivityDefinition(contexts=[RemoveBrief],
                                   description=_("Remove the news flash"),
                                   title=_("Remove"),
                                   groups=[]),
         eg=ExclusiveGatewayDefinition(),
         end=EndEventDefinition(),
     )
     self.defineTransitions(
         TransitionDefinition('start', 'pg'),
         TransitionDefinition('pg', 'creat'),
         TransitionDefinition('creat', 'eg'),
         TransitionDefinition('pg', 'see'),
         TransitionDefinition('see', 'eg'),
         TransitionDefinition('pg', 'edit'),
         TransitionDefinition('edit', 'eg'),
         TransitionDefinition('pg', 'publish'),
         TransitionDefinition('publish', 'eg'),
         TransitionDefinition('pg', 'archive'),
         TransitionDefinition('archive', 'eg'),
         TransitionDefinition('pg', 'remove'),
         TransitionDefinition('remove', 'eg'),
         TransitionDefinition('eg', 'end'),
     )