Skip to content

Installation Instructions

1. Add Package Dependency

Add limepkg-workorder as a dependency to your solution.

poetry add limepkg-workorder
poetry add limepkg-workorder-list-actions
poetry add limepkg-form-actions

2. Set up Database Structure

Different parts of the work order package requires different tables and fields to be present. It is possible to set them up manually, or use the available LIP packages.

  1. Download the following LIP packages for Work order from the latest release:
    • Absence
    • Article
    • Default resource
    • Scheduled work order
    • Work order
  2. Download the LIP package for Form (a.k.a. Form protocol) from the latest release.
  3. Download the LIP package for Scheduled LimeObject from the latest release.
  4. Install the LIP packages through VBA in the following order:
    1. Work order
    2. Article
    3. Absence
    4. Default resource
    5. Form
    6. Scheduled LimeObject
    7. Scheduled work order
  5. In LISA:
    • Insert descriptives
    • Insert SQL on updates
    • Insert icons
  6. If you installed the scheduledworkorder limetype make sure to enable Log changes on it to ease troubleshooting.
  7. On the work order limetype: insert relations to objects that a work order may concern. Buildings, apartments, machines, services, etc. Usually the thing(s) your customer provides to their customers.

3. Set up Users and Groups

Perform these steps in LISA.

  1. Create a Field workers group and add users to it. This group is used to control who should see the Work order list widget.

  2. Create a Certifiers group and add users to it. This group is used to control who should be able to edit article rows when the status has changed from not approved. (Only applicable when using the decorator @certifiers_when_approved.)

  3. Create a Work Order Administrators group and add users to it. This group is used to control who should be able to see the Resource Planner on the Start Page. (Only applicable when using the Resource Planner)

  4. Create a task@scheduledlimeobject user and give it admin permissions. This user is used by the scheduled task that creates scheduled work orders in the package limepkg-scheduled-limeobject. Use the following settings:

    • Password: Type a really long nonsense password. Do not store it anywhere (it is not needed).
    • Active: No
    • Type: Integration
    • Login: LIME PRO Authentication (default in Cloud)

4. Set up Web Client

To be able to use the new lime types and features from this package, they need to be configured in Lime Admin. For the quickest setup be sure to import the provided config files.

  1. Import web client views and start pages configuration. Views and start pages configuration files are to be imported one by one designated places in Lime Admin ➡ Views and Lime Admin ➡ System ➡ Start pages respectively. By doing so, you will be more in control of which configurations you want to import. You will also receive more helpful error messages if that should happen.

    The files that you should import are found on Github. There you will find configurations for:

    • Views
      • Absence
      • Article
      • Article row
      • Recurring work order (a.k.a. Scheduled work order)
      • Recurring work order parameters (a.k.a. Scheduled work order parameters)
      • Work order
    • Start pages.
  2. Create filters. Create at least these two filters in the work order table:

    1. My open "webclient.workorder.my_open" (coworker=$me and state=NotStarted OR Started)
      {
      "op": "AND",
      "exp": [
          {
              "key": "coworker",
              "op": "=",
              "exp": "$me"
          },
          {
              "key": "state",
              "op": "IN",
              "exp": [
                  "NotStarted",
                  "Started"
              ]
          }
        ]
      }
      
    2. My finished "webclient.workorder.my_finished" (coworker=me and state=finished)
      {
      "op": "AND",
      "exp": [
          {
              "key": "coworker",
              "op": "=",
              "exp": "$me"
          },
          {
              "key": "state",
              "op": "IN",
              "exp": [
                  "Finished"
              ]
          }
        ]
      }
      
    3. Unassigned "webclient.workorder.unassigned" (coworker=null)
      {
      "key": "coworker",
      "op": "=",
      "exp": null
      }
      

5. Import Settings

The Settings files are to be imported one by one to designated places in Lime Admin ➡ Settings. By doing so, you will be more in control of which configurations you want to import. You will also receive more helpful error messages if that should happen.

The files that you should import are found on Github. There you will find configurations for:

  • Document Widget
  • Form
  • Scheduled LimeObject
  • Work Order
  • Work Order List
  • Work Order List Actions

6. Configure Maps

Follow instructions in Maps documentation

Recommended Maps configuration to use is found on Github

7. Custom Limeobjects

  1. Create a custom limeobject class for the lime type that corresponds to work orders. Decorate it with @workorder. This decorator will inject the necessary business logic to implement the different work order behaviors.

    from lime_type.limeobjects import LimeObject
    from limepkg_workorder.decorators import workorder
    
    
    @workorder()
    class Workorder(LimeObject):
        pass
    
    
    def register_limeobject_classes(register_class):
        register_class('workorder', Workorder)
    
  2. Create a custom limeobject class for the lime type that corresponds to article rows. Decorate it with @articlerow. This decorator will inject the necessary business logic to implement the different article row behaviors.

    from lime_type.limeobjects import LimeObject
    from limepkg_workorder.decorators import articlerow
    
    
    @articlerow()
    class ArticleRow(LimeObject):
        pass
    
    
    def register_limeobject_classes(register_class):
        register_class('articlerow', ArticleRow)
    

You should now be able to start Work order with the standard configuration. 🎉🎉🎉

Head to the configuration section if you want to tweak and tune your Work order setup to your customer's needs.