/// <summary>
 /// Constructor for specifying a Background Instance of RBrokerWorker
 /// </summary>
 /// <param name="task">BackgroundTask reference</param>
 /// <param name="executorTaskRef">Reserved for future use</param>
 /// <param name="isPriorityTask">Boolean indicating if this ia high priority task</param>
 /// <param name="rUser">RUser reference</param>
 /// <param name="resourceToken">integer referencing the token from the reosurce pool</param>
 /// <param name="rBroker">RBroker reference</param>
 /// <remarks></remarks>
 public BackgroundTaskWorker(BackgroundTask task,
                             long executorTaskRef,
                             Boolean isPriorityTask,
                             RUser rUser,
                             int resourceToken,
                             RBroker rBroker)
 {
     m_task = task;
     m_executorTaskRef = executorTaskRef;
     m_isPriorityTask = isPriorityTask;
     m_rUser = rUser;
     m_resourceToken = resourceToken;
     m_rBroker = (BackgroundTaskBroker) rBroker;
 }
        /// <summary>
        /// cloneTask override method for BackgroundTaskBroker.
        /// </summary>
        /// <remarks></remarks>
        protected override RTask cloneTask(RTask genesis)
        {
            BackgroundTask source  = (BackgroundTask) genesis;
            BackgroundTask clone = null;
            if(source.code != "")
            {
                clone = new BackgroundTask(source.name,
                                           source.description,
                                           source.code,
                                           source.options);
            }
            else
            {
                clone = new BackgroundTask(source.name,
                                           source.description,
                                           source.filename,
                                           source.directory,
                                           source.author,
                                           source.version,
                                           source.options);
            }

            if(source.external != "")
            {
                clone.external = source.external;
            }
            clone.setToken(source.getToken());
            return clone;
        }