AX 2012 Technical - Customizing workflow

Problem Description
Hi,
I just got the following question regarding WF customization using X++ code. 
Any help is appreciated since case is old already:

We are designing a workflow which has variable number of approvals. Variable means number of approvals became clear after the workflow starts. 
Also the people that approvals are assigned to became clear at run-time according to a parameter. We need a workflow design that has variable number of approvals and variable assigned people. Could you help me how it can be done?


Thanks a lot for your help,

Response#1
Maybe you can find useful information here:

Workflow Providers Overview
====================
http://msdn.microsoft.com/en-us/library/cc519521.aspx

Walkthrough: Creating a Workflow Template
=============================
http://msdn.microsoft.com/en-us/library/cc641259.aspx

Walkthrough: Creating a Workflow with a Task and an Approval
=========================================
http://msdn.microsoft.com/en-us/library/cc585944.aspx

Walkthrough: Adding Workflow to an Existing Form
=================================
http://msdn.microsoft.com/en-us/library/cc653399.aspx