UPDATE-RATE

Die Test-Installation wird aktuell zwischen 8:00 und 18:00 Uhr stündlich zur vollen Stunde aktualisiert.

Alles neu macht der Mai

ILIAS 9 ist da! Alle Infos zu den Highlights der neuen Version gibt es hier!

Documentation

Kitchen Sink documentation of style: 'Delos' of skin: 'ILIAS'

Step

Description

Purpose
A workflow step represents a single step in a sequence of steps. The status of a step consists of two parts: its availability and its outcome or result. Possible variants of availability are "available", "not available" and "not available anymore". The status "active" will be set by the workflow. The status of a step is defined as "not started", "in progress", "completed successfully" and "unsuccessfully completed".
Composition
A workflow step consists of a label, a description and a marker that indicates its availability and result. If a step is available and carries an action, the label is rendered as shy-button.
Effect
A Step MAY have an action; when clicked, the action is triggered.
Context
  1. A Step MUST be used within a Workflow.

Example 1: Base

Linear Workflow

  • available, successfully completed (1)
  • available, unsuccessfully completed (2)
  • available, not started (3)
  • available, in progress (4)
  • available, in progress, active (by workflow) (5)
  • not available, not started (6)
  • not available, in progress (7)
  • not available, successfully completed (8)
  • not available, unsuccessfully completed (9)
  • not available anymore, not started (10)
  • not available anymore, in progress (11)
  • not available anymore, successfully completed (12)
  • not available anymore, unsuccessfully completed (13)
<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Listing\Workflow\Step;
 
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('available, successfully completed', '(1)')
            ->withAvailability($step::AVAILABLE)->withStatus($step::SUCCESSFULLY),
        $f->step('available, unsuccessfully completed', '(2)')
            ->withAvailability($step::AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
        $f->step('available, not started', '(3)')
            ->withAvailability($step::AVAILABLE)->withStatus($step::NOT_STARTED),
        $f->step('available, in progress', '(4)')
            ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
        $f->step('available, in progress, active (by workflow)', '(5)')
            ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
        $f->step('not available, not started', '(6)')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::NOT_STARTED),
        $f->step('not available, in progress', '(7)')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::IN_PROGRESS),
        $f->step('not available, successfully completed', '(8)')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::SUCCESSFULLY),
        $f->step('not available, unsuccessfully completed', '(9)')
            ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
        $f->step('not available anymore, not started', '(10)')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::NOT_STARTED),
        $f->step('not available anymore, in progress', '(11)')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::IN_PROGRESS),
        $f->step('not available anymore, successfully completed', '(12)')
            ->withAvailability($step::NOT_ANYMORE)->withStatus($step::SUCCESSFULLY),
        $f->step('not available anymore, unsuccessfully completed', '(13)')
            ->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
<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Listing\Workflow\Step;
 
function with_actions()
{
    //init Factory and Renderer
    global $DIC;
    $f = $DIC->ui()->factory()->listing()->workflow();
    $renderer = $DIC->ui()->renderer();
 
    //setup steps
    $step = $f->step('', '');
    //action is set by the third parameter for the step-factory
    $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