Sha256: 566bc22868c14ece96bcbad422f7187ca608264de9f624aa9de9d55533a19bc5

Contents?: true

Size: 915 Bytes

Versions: 1

Compression:

Stored size: 915 Bytes

Contents

module Asposetasksjava
  module WbsAssociatedWithTask
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate project object
        project = Rjb::import('com.aspose.tasks.Project').new(data_dir + 'test_tasks.mpp')

        # Create a ChildTasksCollector instance
		collector = Rjb::import('com.aspose.tasks.ChildTasksCollector').new

		# Collect all the tasks from RootTask using TaskUtils
		Rjb::import('com.aspose.tasks.TaskUtils').apply(project.getRootTask(), collector, 0)

		tsk = Rjb::import('com.aspose.tasks.Tsk')

		tasks = collector.getTasks()

		# Parse through all the collected tasks
		i = 0
		while i < tasks.size()
			task = tasks.get(i)
			puts "WBS: " + task.get(tsk.WBS).to_string
			puts "WBS Level: " + task.get(tsk.WBS_LEVEL).to_s
			i +=1
		end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/Tasks/wbsassociatedwithtask.rb