Timefold GetDataset

Timefold GetDataset

Certified

Retrieve a dataset from the Timefold Platform by job ID

Fetches the current state of a previously submitted solving job from the Timefold Platform. Returns the modelOutput together with the solverStatus and score as reported by the platform at the time of the call.

Use this task after io.kestra.plugin.timefold.Solve to retrieve the solution once solving has completed. See the Timefold API documentation.

yaml
type: io.kestra.plugin.timefold.GetDataset

Submit a problem and retrieve the solution in a two-task flow.

yaml
id: timefold_route
namespace: company.team

tasks:
  - id: solve
    type: io.kestra.plugin.timefold.Solve
    apiKey: "{{ secret('TIMEFOLD_API_KEY') }}"
    model: FIELD_SERVICE_ROUTING
    solveDuration: PT30S
    modelInput:
      vehicles:
        - id: Ann
          shifts:
            - id: Ann-2027-02-01
              startLocation: [33.68786, -84.18487]
              minStartTime: "2027-02-01T09:00:00Z"
      visits:
        - id: Visit A
          location: [33.77301, -84.43838]
          serviceDuration: PT1H30M
  - id: get_result
    type: io.kestra.plugin.timefold.GetDataset
    apiKey: "{{ secret('TIMEFOLD_API_KEY') }}"
    model: FIELD_SERVICE_ROUTING
    jobId: "{{ outputs.solve.jobId }}"
Properties

The Timefold Platform API key

Sent as the X-API-KEY header on every request. Provide it via a secret, for example apiKey: "{{ secret('TIMEFOLD_API_KEY') }}". The key must have access to the selected model.

The job ID of the solving run to retrieve

Returned as jobId by io.kestra.plugin.timefold.Solve.

Possible Values
FIELD_SERVICE_ROUTINGEMPLOYEE_SCHEDULINGPICKUP_DELIVERY_ROUTING

The Timefold model to solve with

Determines the REST resource the dataset is submitted to. FIELD_SERVICE_ROUTING uses the route-plans endpoint and EMPLOYEE_SCHEDULING uses the schedules endpoint.

Defaulthttps://app.timefold.ai

Base URL of the Timefold Platform API

Defaults to the Timefold managed cloud. Override this when running a self-hosted Timefold deployment. The model and resource path segments are appended automatically, so provide only the host, e.g. https://app.timefold.ai.

DefaultSTORE
Possible Values
STOREFETCHFETCH_ONENONE

How to return the modelOutput

  • STORE (default): writes modelOutput as a JSON file to Kestra's internal storage and returns its URI in uri. Recommended for large solutions.
  • FETCH / FETCH_ONE: returns modelOutput inline in the modelOutput output field.
  • NONE: discards modelOutput entirely (useful when only solverStatus and score are needed).

Reference (ref) of the pluginDefaults to apply to this task.

The identifier of the solving job on the Timefold Platform

The optimized solution (modelOutput) returned inline (populated when fetchType is FETCH or FETCH_ONE)

The modelOutput object returned by the Timefold Platform. Populated when fetchType is FETCH or FETCH_ONE.

The score of the solution at the time of retrieval, e.g. 0hard/0medium/-3603soft

The solver status at the time of retrieval, e.g. SOLVING_COMPLETED or SOLVING_ACTIVE

Formaturi

URI to the stored modelOutput (populated when fetchType is STORE)

Points to the modelOutput JSON file written to Kestra's internal storage. Populated when fetchType is STORE (the default).