Giter Site home page Giter Site logo

Comments (4)

csgoh avatar csgoh commented on May 23, 2024

@ShuaiweiYu , I'm delighted you used the processpiper package in your thesis. I looked at your example, and the reason you got the error is that you are attempting to connect 'gateway_2' to more than three different elements. Consider the following code segment:

gateway_1_end->activity_04->activity_05->activity_06->gateway_2
gateway_2-"reject the request"->activity_07->gateway_2_end
gateway_2-"ask the request"->activity_08->activity_09->activity_10->gateway_2_end
gateway_2-"approve the request"->activity_11->activity_12->activity_13->gateway_2_end
gateway_2-"the vendor is not valid"->activity_14->activity_15->gateway_2_end

A gateway can have a maximum of four connections. You have one incoming connection from the activity_6 element and four outgoing connections, for a total of five connections.

I suggest you change your code to reduce the complexity of your gateway. You could add another gateway after gateway_2 like the diagram below.
image

Hope this help.

I will change the processpiper package in the next release to have more user friendly error message.

from processpiper.

ShuaiweiYu avatar ShuaiweiYu commented on May 23, 2024

cool! thanks for the clear and quick response. Can you also take a look at this example?

title: debug
width: 10000
colourtheme: BLUEMOUNTAIN
lane:
(start) as start
[the loan approval process starts] as activity_10
[receiving a customer request for a loan amount] as activity_11
[invoke the risk assessment web service] as activity_12
[assess the request] as activity_13
<> as gateway_1
[approve the loan] as activity_4
[deny the loan] as activity_6
[send the request] as activity_9
<> as gateway_1_end
[the customer receives feedback from the assessor or approver] as activity_14
(end) as end

start->activity_10->activity_11->activity_12->activity_13->gateway_1
gateway_1-"the loan is small, the customer is"->activity_4->gateway_1_end
gateway_1-"the customer is"->activity_6->gateway_1_end
gateway_1-"the customer needs further review, the loan amount is for $ 10,000 or more"->activity_9->gateway_1_end
gateway_1_end->activity_14->end

the conditions here specified for each situation are actually not very well displayed. In the diagram below, as you can see, the "the loan is small, the customer is" and "the customer is" fit well, but "the customer needs further review, the loan amount is for $ 10,000 or more" seems as if it belongs to somewhere above.
text08_test

from processpiper.

csgoh avatar csgoh commented on May 23, 2024

Hi, unfortunately, this a defect in the processpiper package. I will try to fix it in the next release.

Meantime, this is what I have as a workaround:

title: debug
width: 10000
colourtheme: BLUEMOUNTAIN
pool: Pool
lane: 
    (start) as start
    [the loan approval process starts] as activity_10
    [the customer receives feedback from the assessor or approver] as activity_14
    (end) as end

lane: 
    [receiving a customer request for a loan amount] as activity_11
    [invoke the risk assessment web service] as activity_12
    [assess the request] as activity_13
    <> as gateway_1
    <> as gateway_2
    <> as gateway_3
    
lane: 
    [approve the loan] as approve_the_loan
    [send the request] as send_the_request
    [deny the loan] as deny_the_loan
    
lane: 
    <> as gateway_2_end
    
lane: 
    <> as gateway_1_end


start->activity_10->activity_11->activity_12->activity_13->gateway_1
gateway_1->gateway_2
gateway_1-"the loan is \\nsmall, the \\ncustomer is"->approve_the_loan->gateway_1_end
gateway_2->gateway_3
gateway_2-"the customer is"->send_the_request->gateway_2_end
gateway_3->deny_the_loan
deny_the_loan->gateway_2_end
gateway_2_end->gateway_1_end
gateway_1_end->activity_14->end
image

from processpiper.

csgoh avatar csgoh commented on May 23, 2024

@ShuaiweiYu In v.0.4.2, you can now have all elements in one lane:

from processpiper import text2diagram

piperflow = """title: debug
width: 10000
colourtheme: BLUEMOUNTAIN
pool: Pool
lane: 
    (start) as start
    [the loan approval process starts] as activity_10
    [the customer receives feedback from the assessor or approver] as activity_14
    (end) as end
    [receiving a customer request for a loan amount] as activity_11
    [invoke the risk assessment web service] as activity_12
    [assess the request] as activity_13
    <> as gateway_1
    <> as gateway_2
    [deny the loan] as deny_the_loan
    [approve the loan] as approve_the_loan
    [send the request] as send_the_request
    <> as gateway_2_end
    <> as gateway_1_end


start->activity_10->activity_11->activity_12->activity_13->gateway_1

gateway_1->gateway_2
gateway_1-"the loan is \\nsmall, the \\ncustomer is"->approve_the_loan->gateway_1_end

gateway_2->deny_the_loan
gateway_2-"the customer is"->send_the_request->gateway_2_end


deny_the_loan->gateway_2_end
gateway_2_end->gateway_1_end

gateway_1_end->activity_14->end
"""

code, img = text2diagram.render(piperflow, "debug.png")
image

from processpiper.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.