ILIAS 5.4 Evaluation
  • Anmelden
Screen-ID: sty/system_styles/documentation

Brotkrumen-Navigation

Dokumentation

'Kitchen Sink'-Dokumentation von Style: 'Delos' vom Skin: 'ILIAS'

Linear

Description

Purpose
A linear workflow is the basic form of a workflow: the user should tackle every step, one after the other.
Composition
A linear workflow has a title and lists a sequence of steps. If the user is currently working on a step, the step is marked as active.
Effect
A Step MAY have an action; when clicked, the action is triggered.

Rules

Usage
  1. Use a Linear Worflow for a set of tasks that should be performed one after the other and where there are no inter-dependencies other than completeliness of the prior task.
  2. You SHOULD NOT use Linear Workflow for workflows with forked pathes due to user-decisions or calculations.
  3. You SHOULD NOT use Linear Workflow for continous workflows; a inear workflow MUST have a start- and and end-point.

Example 1: Base

Linear Workflow

  • step 1 available, successfully completed
  • step 2 available, unsuccessfully completed
  • step 3 available, not started
  • step 4 available, in progress
  • active step available, in progress, active (by workflow)
  • step 6 not available, not started
  • step 7 not available, in progress
  • step 8 not available, successfully completed
  • step 9 not available, unsuccessfully completed
  • step 10 not available anymore, not started
  • step 11 not available anymore, in progress
  • step 12 not available anymore, successfully completed
  • step 13 not available anymore, unsuccessfully completed
 
function base()
{
    //init Factory and Renderer
    global $DIC;
    $f = $DIC->ui()->factory()->listing()->workflow();
    $renderer = $DIC->ui()->renderer();
 
    //setup steps
    $step = $f->step('', '');
    $steps = [
        $f->step('step 1', 'available, successfully completed')
            ->withAvailability($step::AVAILABLE)->withStatus($step::SUCCESSFULLY),
        $f->step('step 2', 'available, unsuccessfully completed')
            ->withAvailability($step::AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
        $f->step('step 3', 'available, not started')
            ->withAvailability($step::AVAILABLE)->withStatus($step::NOT_STARTED),
        $f->step('step 4', 'available, in progress')
            ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
        $f->step('active step', 'available, in progress, active (by workflow)')
            ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
        $f->step('step 6', 'not available, not started')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::NOT_STARTED),
        $f->step('step 7', 'not available, in progress')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::IN_PROGRESS),
        $f->step('step 8', 'not available, successfully completed')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::SUCCESSFULLY),
        $f->step('step 9', 'not available, unsuccessfully completed')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
        $f->step('step 10', 'not available anymore, not started')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::NOT_STARTED),
        $f->step('step 11', 'not available anymore, in progress')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::IN_PROGRESS),
        $f->step('step 12', 'not available anymore, successfully completed')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::SUCCESSFULLY),
        $f->step('step 13', 'not available anymore, unsuccessfully completed')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::UNSUCCESSFULLY),
    ];
 
    //setup linear workflow
    $wf = $f->linear('Linear Workflow', $steps)
        ->withActive(4);
 
    //render
    return $renderer->render($wf);
}
 

Example 2: With actions

Linear Workflow

  • available, successfully completed
  • step 2 not available anymore, unsuccessfully completed
  • available, in progress, active (by workflow)
  • available, not started
  • step 5 not available, not started
 
function with_actions()
{
    //init Factory and Renderer
    global $DIC;
    $f = $DIC->ui()->factory()->listing()->workflow();
    $renderer = $DIC->ui()->renderer();
 
    //setup steps
    $step = $f->step('', '');
    $steps = [
        $f->step('step 1', 'available, successfully completed', '#')
            ->withAvailability($step::AVAILABLE)->withStatus($step::SUCCESSFULLY),
        $f->step('step 2', 'not available anymore, unsuccessfully completed', '#')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::SUCCESSFULLY),
        $f->step('active step', 'available, in progress, active (by workflow)', '#')
            ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
        $f->step('step 4', 'available, not started', '#')
            ->withAvailability($step::AVAILABLE)->withStatus($step::NOT_STARTED),
        $f->step('step 5', 'not available, not started', '#')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::NOT_STARTED),
    ];
 
    //setup linear workflow
    $wf = $f->linear('Linear Workflow', $steps)
        ->withActive(2);
 
    //render
    return $renderer->render($wf);
}
 

Relations

Parents
  1. UIComponent
  2. Listing
  3. Workflow