Skip to content

[FR]Build routing/Workflows #2817

Open
Open

Description

@martonmiklos

Problem
I know that Inventree is more a storage management system and not MES (Manufacturing Execution System) however supporting build routing would add to it's trait I think in the build management aspects.

Foreword: the terminology I will use below comes from a company where I worked for. We can deviate from this terminology of course.

Most of the manufacturing processes can be broken down into separate individual steps (routing steps). The order of these steps for a single products make up the routing of the product.

Having this information added to the Inventree could help users to better understand the state of their build orders and could be used as a source of making statistic reports for the manufacturing process.

Suggested solution
Add an option to being able to assign routing for Assemblies which trackable.
This option would give the user ability for adding routing steps to the product routing.
Routing step would have an ID, a name and a description.
Two routing steps are special in the routing: the creation step and the completed step.

I know that manufacturing process flows can be more difficult than a simple a->b->c->d order of steps.
For e.g. your product goes for functional testing, if it fails it goes to rework, then goes back to test, if it passes it goes for packaging.

However for the shake of simplicity I would recommend to implementing a straight routing support only. The same approach were used in the factory I used to work for and the exceptions were handled with a simple To move/Reject result for each routing step.

The following information needed to be assigned to the Stock items (where routing is added):

  • Current routing step of the Stock item
  • History of past routing steps with their results (move to next step/reject) to see if the product was tested multiple times due to failure for e.g.

Manufacturing UI changes:
We need to implement a form to move/reject stock items identified by serial number from the current step.

Reports:
We could create an in depth build output completed report where each routing step would be listed with the amount of waiting/rejected products.
We could calculate a first pass yield for each step/the whole routing for a specific build order.

Describe alternatives you've considered
I have not really considered alternatives.

Examples of other systems
Oracle has a MES system which works the described way

Do you want to develop this?
Sure. Let's make a clear concept about what and how needs to be implemented and then I can work on this. I have some level of Python knowledge and used PHP MVC frameworks before (mainly CakePHP). I am looking forward to hear your opinion about this.

Activity

  1. added
    enhancement
    on Apr 12, 2022
  2. github-actions commented on Apr 12, 2022

    @github-actions
    Contributor

    Welcome to InvenTree! Please check the contributing docs on how to help.\nIf you experience setup / install issues please read all install docs.

  3. SchrodingersGat commented on Apr 12, 2022

    @SchrodingersGat
    Member

    @martonmiklos the company I work in would probably most likely benefit from such a feature too, I can see it being useful.

    I can also see it being quite a large undertaking to actually implement!

    To start the conversation, could you provide a more comprehensive example of what you would like to see? Maybe a simple example product, with some build / manufacturing steps you'd expect to see. Having a clearer idea of what you expect here can help move the discussion forward :)

  4. added
    question
    roadmap
    build
    on Apr 12, 2022
  5. martonmiklos commented on Apr 12, 2022

    @martonmiklos
    ContributorAuthor

    Hi @SchrodingersGat
    Many thanks for your feedback!

    I can also see it being quite a large undertaking to actually implement!

    It is indeed.

    Here is an example manufacturing flow we do now. The product is a resin potted electronics assembly.

    1. The physical build starts with soldering together the populated circuit boards. (The boards are made by a 3rd party company and considered as a raw material.)
    2. The process continues with soldering the cabling onto the boards.
    3. As a next step an enclosure is installed where the serial number sticker got installed. (The products become trackable from this point.)
    4. We perform a functional test
    5. The product got potted with resin
    6. A visual inspection check is made after the potting
    7. We perform a functional test again to be sure that the resin potting made correctly (no leaks, whatever)
    8. The product got packaged

    Here is how the routing would look like:

    1. PRNT - Label printing/installation (the steps before this is not trackable). This would be the routing start step.
    2. FVT1 - Functional Verification Test 1. We use a test software to perform the tests and it could be modified to move the product automatically via an API call
    3. VISI - Visual inspection after potting. The QA assistant should check the serial numbers of the checked products
    4. FVT2 - Same/similar test in step 2, routing move shall be handled by the test SW via API here as well.
    5. PKG - The product serial number got scanned before put into the packaging. This is the last step of the routing.

    I forgot to mention that the routing move operation should be also tied to the Inventree user who performed the step. (Quality wise it could be very important for e.g. at the Visual inspection step.)

  6. matmair commented on Apr 12, 2022

    @matmair
    Member

    Hi there @martonmiklos !
    This feature was already suggested but not worked on (based on no further comments) in #2189 .

    This would be a significant amount of work. Especially with separating the function out because MES is out of cope for any users.
    I will think about all needed components and post a suggested architecture in the following days.

  7. martonmiklos commented on Apr 13, 2022

    @martonmiklos
    ContributorAuthor

    Hi @matmair

    This feature was already suggested but not worked on (based on no further comments) in #2189 .

    Ah, I read trough all open issues looking for similars to my suggestion but did not find it (as it was closed).

    Based on the title of this table (note I am not a native French speaker ;) ) I am under the impression that the #2189 tries to put two things in one hat:
    kép

    • Manufacturing start checklist (Col H-S)
    • Production process tracking (Col T 'Test finition')

    My routing recommendation would cover the second part.

    Especially with separating the function out because MES is out of cope for any users.

    I would recommend to keep it simple:
    If routing is not defined for a specific Part, the InvenTree shall work as is works now.
    If the routing is defined for a (trackable) part then the following features needs to be enabled:

    • Extended build output status view: where the products belonging to a Build order state could be checked easily.
    • Part routing move forms and API

    My basic goals with having routing feature added to InvenTree is to have serial number based traceability and to gain a quick overview of manufacturing status.

  8. SchrodingersGat commented on Apr 13, 2022

    @SchrodingersGat
    Member

    Currently (at my work) we kind of "hack" this in, by using the existing testing framework.

    For example:

    • If the device has had firmware programmed on, the "firmware" test will have passed (and the firmware hash provided).
    • The board has gone through AOI. It may have been through multiple times if for e.g. it required rework. Each AOI pass is recorded
    • The PCB has been through bed-of-nails testing. Test results are uploaded via the API

    Each of these "tests" is a "process", yes? Perhaps the existing framework could be extended slightly to provide you with the functionality you want, without too much scope creep / feature bloat?

    What would you be looking for that the current "testing" framework does not offer?

    • Results can be uploaded multiple times against the same test (e.g. fail / fix / fail / fix / pass)
    • Tracks when the result was uploaded, and by which user
    • Allows upload of file attachments
  9. martonmiklos commented on Apr 13, 2022

    @martonmiklos
    ContributorAuthor

    Yeah, we are pretty much walking in the similar boot.

    Our testing framework currently only does a very simple logging: it produces an XML file which contains the result and all of the test steps' parameters (both measured and input parameters like test limits).

    What would you be looking for that the current "testing" framework does not offer?

    If this question is addressed to me: I would like to have a web based overview of a Build order broken down to serial number.
    And I would like to see how a given product (by serial number) went through the routing: who tested/inspected it, when, how many time did it failed, etc. Later on we can build common manufacturing reports for failure rate, first pass yield, etc, but that is not that important as a first step.

    Based on the logs we produce I can "mine" these information from the XMLs, but that would require a ground up implementation.

    Based on my previous experiences it is good to have separation on the following functions:

    • Testing tool/framework - the role is to performing the actual testing an produce a proper log from the execution. Primary users are the operators or technicians in the manufacturing floor.
    • Data analytics - parametric test result analysis of the logs produced by the testing tool (like, histograms, trend charts of measured parameters) Primary users are the test or development engineers.
    • MES - should provide reporting capabilities at higher level (first pass yield, failure rate, etc.) Primary users are the operators and the production supervisors.

    In our case the test tool is in place and does what I expect from it. We also have tools for data analytics. However for MES we have virtually nothing, and I thought that InvenTree could be expanded to cover our needs.

    And on the another hand do not just focus on the testing. Other non testing related steps could/should be tracked if the proper routing is defined like manual inspections, packaging, etc.

  10. SchrodingersGat commented on Apr 13, 2022

    @SchrodingersGat
    Member

    And on the another hand do not just focus on the testing. Other non testing related steps could/should be tracked if the proper routing is defined like manual inspections, packaging, etc.

    Perhaps "testing" is the wrong nomenclature here, then. If the terminology was something like "processes" then this could easily include other steps like inspection, packaging, etc.

    We currently have "tests" which are called things like "applied label" or "installed wire harness". Not really a "test" specifically, but for our tracking purposes it amounts to the same thing.

    I think that there is scope to expand what we currently have, as it sounds like there are at least two companies using the "test" framework for more that it was originally intended...

  11. matmair commented on Apr 16, 2022

    @matmair
    Member

    I tought about this the last few days and I would suggest this architecture @SchrodingersGat @martonmiklos:

    • Adding a new model 'Process'. This model is a TreeModel with a least this fields:
      • Name
      • Description
      • 'Must be done for build' -> stops BOs from finishing if not checked for each part
      • 'Children' -> Sub-Steps are processes themself which are linked as children
      • 'Worktext' -> Markdown field for a nice text
    • New model 'StockItemProcessState' that contains if the state was:
      • created
      • started
      • halted
      • stopped
      • done
    • If a part has the flag 'Support build process' enabled a new tab will occur in build orders: 'Build Processes'. In this tab all processes for the part will be rendered
    • Before completing a BO it will be checked if there are 'needed' processes for the part. If so it will be checked if all Stock Items have all their processes done

    This could be extended with optional make image / file upload possible and make the whole thing plugin enabled by:

    • adding json-fields to both models
    • a mixin
    • methods for plugins to append and read additional info
    • render-window for custom stuff in the tab
    • option to add an tab to BOs / SOs
  12. martonmiklos commented on Apr 17, 2022

    @martonmiklos
    ContributorAuthor

    Hi @matmair

    Frohe Ostern, and many thanks for your proposal!

    If I understand the proposed models correctly it supports the 'checklist like' approach. I think the order of the manufacturing steps execution is used to be very important in most cases. Even if you can swap steps (like solder wires to the board before the assembly of the connector), it is healthy to rigorously follow a given well-tested procedure because unforeseen side effects could be caused by such a changes.

    In my head the following lives:

    Process:

    • Belongs to a Part
    • HasMany ProcessSteps
    • Name
    • Description
    • 'Worktext' -> Markdown field for a nice text
    • First step - BelongsTo ProcessStep

    We can have the TreeModel approach here, but I think most manufacturing processes can be flattened quite easily by having a step list with reasonable length. In the systems what I saw the elemental steps like "tighten this screw" was not part of the MES steps, but were part of the work instructions. But anyway

    ProcessStep:

    • Belongs to a Process
    • Identifier (stiring like FVT, HiPOT)
    • Name (string)
    • Description (could be markdown)
    • NextStepOnPass - BelongsTo ProcessStep (if null then it is the last step of the Process)
    • NextStepOnFail - BelongsTo ProcessStep (if null then the StockItem stays on the current ProcessStep on failure)

    With this separated pass/fail next approach we could cover cases where backstepping in process is very important.

    Let's take the following example:
    Some products requiring High voltage tests and have the following manufacturing process:

    • FINA - Final Assembly
    • HiPOT - High voltage test (insulation and ground bonding)
    • FVT - Functional test

    Products failing on HiPOT should never reach FVT because they could harm the test equipment or the worse the operator. (Having HiPOT NextStepOnFail set to HiPOT could enforce it.)
    Failure on FVT should take back the part to the HiPOT step, because if rework/repair is performed it has to be pass on HiPOT again.

    StockItemProcessSteps

    • BelongsTo a StockItem
    • BelongsTo a ProcessStep
    • Started (timestamp)
    • StartedBy (User)
    • Finished (timestamp)
    • Successful (bool)

    Supporting both approaches (checklist and ordered process) is an option as well.

  13. matmair commented on Apr 18, 2022

    @matmair
    Member

    @martonmiklos thank you.

    All tree models have an order built in by MPTT but I can appreciate where you are coming from. I will create a data model graph today so we can discuss this further. I think we are going into a similar and right direction.

  14. 9 remaining items

  15. rotofyne commented on Apr 25, 2022

    @rotofyne

    @matmair I've got limited experience with Django.
    @SchrodingersGat I think a process would ideally apply to the build outputs. In your example the "shipped to anodizer" would apply to particular build outputs and its important to know which build outputs received which processes from a traceability perspective. Further, depending on circumstances, you could have the same process completed at different times or in different ways for different build outputs on the same Build Order. Personally, I see the Build Order as being the template/default condition for all of the build outputs with the build outputs containing the specific information about that particular part.

  16. added
    help wanted
    on Jun 27, 2022
  17. changed the title [-][FR]Build routing?[/-] [+][FR]Build routing/Workflows[/+] on Jan 9, 2023
  18. matmair commented on Jan 9, 2023

    @matmair
    Member

    I have thought about this a lot: I think Workflow (in accordance with Slack, MS Teams, ...) might be a better understood feature for this feature then Process

  19. martonmiklos commented on Jan 9, 2023

    @martonmiklos
    ContributorAuthor

    I agree with the workflow terminology, however I suggest to prefix it with build ("Build workflows") from the introduction. I have some dreams about adding some PLM features (item revision change managment with BoM change redlines, etc.) where we also need to have workflows.

  20. matmair commented on Jan 9, 2023

    @matmair
    Member

    @martonmiklos that is the reason I left any prefix out.
    There are some FRs that would benefit from building the core mechanic versatile and composable.

    1. [FR] Purchase Order Approvals #3501
    2. [FR] RMA/ Repair Order function #3298
    3. [FR] Incoming inspection step for parts #2903
    4. [FR] External Processing for Build Routing #2860
  21. SchrodingersGat commented on Jun 5, 2023

    @SchrodingersGat
    Member

    @martonmiklos just a bump to say we have been discussing this one, with some large plans "in the works".

    However we need to get the UI rework out of the way first!

  22. martonmiklos commented on Jun 5, 2023

    @martonmiklos
    ContributorAuthor

    UI rework

    What does it mean? I did not followed all the discussions lately there were some plans switch to React if I remember correctly? Are you referring to that?

  23. SchrodingersGat commented on Jun 5, 2023

    @SchrodingersGat
    Member

    Yep, referring to the react UI switch :)

  24. modified the milestones: 1.0.0, horizon on Jun 3, 2025
  25. SchrodingersGat commented on Jun 3, 2025

    @SchrodingersGat
    Member

    Moving this to the "horizon" target as there is still a lot to discuss wrt implementatino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildenhancementhelp wantedquestionroadmap

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions